![]() The DataModel.PlaceId of the place the Player teleported from. Only present if the player teleports to the current experience and if a server calls the teleport function. ![]() The DataModel.GameId of the experience the Player teleported from. StarterPack that requires access to the player's character, use So if you're writing a LocalScript under the StarterGui or Because of this, if the Character already exists, you shouldĬheck to make sure that the Character's parent is not nil before using it. ![]() Still refers to a model, but that model's parent is nil and it has beenĭestroyed. StarterPack into a player's Backpack or PlayerGuiĪre often run before the old Character model is deleted. Note: LocalScripts that are cloned from StarterGui or Avoid using Instance:GetPropert圜hangedSignal() Player.CharacterRemoving event to detect when the character isĪbout to despawn. Player's character properly loads, and the Use the Player.CharacterAdded event to detect when a Initially, this property is nil then set when the player's character first Players.CharacterAutoLoads is true, but can be manually loaded Players.The Character property contains a reference to a Model containingĪ Humanoid, body parts, scripts and other objects required for RootPart:PivotTo(CFrame.new(myDesiredPosition + Vector3.yAxis * 3)) Local rootPart = character:FindFirstChild("HumanoidRootPart") ![]() Local character = Players:CreateHumanoidModelFromUserId(player.UserId) Local Players = game:GetService("Players") ![]() So, something like: local Workspace = game:GetService("Workspace") If the character is Rthro (is R15, and your game has scaling enabled), then you'll need to call GetExtentsSize on the character Model. So you'll need to offset that vertically by 3 studs if the character is not Rthro (is of fixed size, like R6). You'll notice that this positions the character from their torso's center, and not from their feet. You're better off calling FindFirstChild("HumanoidRootPart") (or WaitForChild). On R6 characters, this is actually the character's Head. Note: do not use Model.PrimaryPart to grab the HumanoidRootPart. Then you can move it by calling PivotTo on their HumanoidRootPart. To create somebody's character, call Players:CreateHumanoidModelFromUserId with the Player's UserId. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |