Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Explanation why this is not working? [Solution Found] [closed]

Asked by 10 years ago

This is supposed to spawn the character at the coordinates below, but doesn't seem to work.

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(Character)

Character.Torso.CFrame = CFrame.new(-49, 1, 9)

end) end)

Locked by TofuBytes and BlueTaslem

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
1
Answered by 10 years ago

I don't see any errors, but you should wait for the torso to become available first by using the WaitForChild() method, since it could be non-existant.

game.Players.PlayerAdded:connect(function(player) 
player.CharacterAdded:connect(function(Character)

Character:WaitForChild("Torso").CFrame = CFrame.new(-49, 1, 9)

end) end)
0
Thanks, I figured out another way though. I appreciate your help anyways. mothmage 5 — 10y
0
No problem. Spongocardo 1991 — 10y
Ad