I don't know how... Do you have to use BodyPosition? Or Cframe? I'm confused... I'm using
local player = game.Players:GetPlayers() for i = 1, #player do player[i].Character:MoveTo(Vector3.new(0,2,0))
Is it right? I know it's right but Why is it only teleporting one person? Not all the players? Also, why is the game working in Studio but not in actual gameplay? It said here that you might need to do localscript but I tried it but It never worked.
Hey there what I would do in your case is use this efficient script found in the Roblox Wiki
wait(30)--Can be any other time target = CFrame.new(0, 50, 0) --could be near a brick or in a new area for i, player in ipairs(game.Players:GetChildren()) do player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0) --add an offset of 5 for each character end
If you want to learn more about teleportation check this link: http://wiki.roblox.com/index.php?title=Teleportation
You could make your own function :3
function teleAll(x, y, z) local pos = Vector3.new(x, y, z) for _, plr in pairs(Game:GetService("Players"):GetPlayers()) do if plr.Character then plr.Character:MoveTo(pos) end end end teleAll(0, 2, 0)
It looks like you've forgot an end. Here's the fixed code:
local player = game.Players:GetPlayers() for i = 1, #player do player[i].Character:MoveTo(Vector3.new(0,2,0)) end
Hope I've helped! If this doesn't work, just comment and I'll be glad to help.