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

I need help with something with teleportals?

Well im making a zombie game and I need to know how to teleport players to a new map.

1 answer

There are two ways to teleport players.

  1. character:MoveTo(Vector3.new(#,#,#)) Call the MoveTo() method on a character model.

  2. character.Torso.CFrame = CFrame.new(#,#,#) Change the CFrame of the character's torso.

As for teleporting ALL players, for that we need to use a for loop.

for i,v in pairs(game.Players:GetPlayers()) do
	local character = v.Character
	--teleport stuff
end

Here, we are going through all the players 1 at a time. v equals the player we are currently at. Since v changes to the current player each time the loop iterates, we can affect all players in a very short amount of time.

Hope I helped!

2 comments

0

I am so confused I got some of it right I think.. UGH hard..

0

What are you confused with? I can try to explain it better.

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