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

How i teleport all players to multiple models (named tp)?

Asked by 3 years ago
Edited 3 years ago
game.Players.LocalPlayer.Character.Torso:MoveTo(game.Workspace.MapStorage.Model.tp

and they dont tp computer says:

ServerScriptService.GameSelect:20:attempt to index nil with character.

2 answers

Log in to vote
1
Answered by 3 years ago

Do

game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Workspace.MapStorage.Model.tp.CFrame

instead, if you R15 or

game.Players.LocalPlayer.Character.Torso.CFrame = game.Workspace.MapStorage.Model.tp.CFrame

if you use R6

0
Thanks ! Omerevkizel 27 — 3y
Ad
Log in to vote
0
Answered by
zadobyte 692 Moderation Voter
3 years ago

You can't get the local player on the server, you have to use PlayerAdded

game.Players.PlayerAdded:Connect(function(plr)

end)

Answer this question