Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to Make people teleport to map from lobby after intermission?

When i tried to do it, it doesnt work for me this is my script

for i,v in pairs(game.Players:getChildren()) do if v:findFirstChild("Character") then v.Character.Torso:MoveTo(0,0,0) -- change this to a position within the lobby end end

1 answer

Don't use the torso ("Torso:MoveTo(0,0,0)"), also why "0, 0, 0"? Is your spawn point located in X:0, Y:0, Z:0? Also "MoveTo" need a new Vec3 instance, like this: "MoveTo(Vec3.new(x, y, z))" Use the player position or the Character position (so MoveTo needs to be on "Character") like this:

for i, player in pairs (game.Players:GetChildren()) do
	if player:FindFirstChild("Character") then
		player.Position = Vec3.new(x, y, z)
		-- OR
		player.Character:MoveTo(Vec3.new(x, y, z))
	end
end

This discussion is preserved as it was. New answers, comments, and votes are closed.