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

Not teleporting everyone?

I have tried this

local pos = Vector3.new(-375.863, 97.1, 834.132)
    for _, player in pairs(game:GetService("Players"):GetPlayers()) do
        if player.Character then
            player.Character:MoveTo(pos)

and roblox's script

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
   --Make sure the character exists and its torso exists
   if player.Character and player.Character:FindFirstChild("Torso") then
       --add an offset of 5 for each character
      player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0)
   end
end

And both only teleport one person....

HELP ME!

Note: this is part of a larger script that teleports people to a map during a round....didn't wanna post the whole thing in case of being hated on by people for posting a 200 line script...

2 answers

I hope this is what you are looking for! Make a Part in workspace and insert this script. When 1 person touches a part, everyone will teleport to that object that the person touched.

function lol()
	local player = game.Players:GetPlayers()
for i = 1, #player do
	player[i].Character:MoveTo(Vector3.new(12.4, 10.649, -209.491)) --Change the cords to what you want to teleport to!  "(12.12.12))"
end
end

script.Parent.Touched:connect(lol)

I am also looking for a script that when someone touches a part, only that 1 person gets teleported. I hope this helps!

I dont have much explaining of this but try:

local pos = Vector3.new(0,0,0) --you know to change this
for i,v in pairs (game.Players:GetPlayers())
	if v.Character then
	v.Character:MoveTo(pos)
end
end

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