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

How to teleport all players to a certain location?

I tried doing this, even tho it wouldn't work, because I'm calling a nil value, but I couldn't think of anything else.

plr = game.Players:GetPlayers() 

if a ~= nil then 
plr.Character.Torso.CFrame = game.Workspace.Island.t1.CFrame
end

please help

2 answers

✓ Accepted answer

Try this:

for i,v in pairs(plr) do
	v.Character.Torso.CFrame = game.Workspace.Island.t1.CFrame
end

This script works for me:

for i, v in pairs(game.Players:GetChildren()) do
	local Character = game.Workspace[v.Name]
	Character.HumanoidRootPart.Position = Vector3.new(-176, 21.5, -220) --Put the position of where you want them to teleport
end

1 comment

0

I have not tested it with multiple players yet though so I am not sure if it will teleport all players

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