I need to teleport all players to an area but I can't seem to find a way,here is a script I found on YouTube but it only messes up the player's avatar.
local position = {-4,3,209} -- This is a part I changed and added {} because it has a blue line underneath it local players = game.Players:GetChildren() for i = 1, #players do players[i].Character:MoveTo(Vector3.new(position)) end
The position Value needs to be a Vector3 not a table/list i would change that to:
local position = Vector3.new(-4,3,209) local players = game.Players:GetChildren() for i = 1, #players do players[i].Character:MoveTo(position) --// this doesn't need to re-cast back to a Vector3 again as its already a Vector3 end
Hope this helps!
TGazza's answer is incorrect. To teleport players, you play with the CFrame property of their respective HumanoidRootParts. MoveTo is a method that makes the player walk to an absolute point in world, that's why it doesn't work. I recommend you to also determine a spacing variable, so the players won't teleport inside each other.
Please, accept this answer in case it's useful for you :)