I need help making a script to where players get teleported to a location in my game. If you know a script please help me.
✓ ANSWER ACCEPTED
How to teleport all players to a location in game?
3 answers
✓ Accepted answer
local Location = CFrame.new(0, 50, 0)
for i, v in pairs(game.Players:GetPlayers()) do
v.Character:SetPrimaryPartCFrame(Location)
end
Are you talking about a teleport IN GAME, or a teleport to another place?
In case of a place in game, here you go.
Put this inside a locascript, then put the localscript inside StarterGear.
player = game.Players.LocalPlayer
repeat wait() until player.Character.HumanoidRootPart
humpart = player.Character.HumanoidRootPart
humpart.CFrame = CFrame.new() -- Position Of A Part
This is probably the easiest way (I didn't test it with FilteringEnabled):
_Players = game.Players:GetChildren()
for x = 1, #_Players do
_Players[x].Character:MoveTo(Vector3.new( Position ))
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
for loop