Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

CFrame only teleporting 1 person?? [Bug??]

Asked by 4 years ago
Edited 4 years ago

I want this to teleport all players in the server to that position, but it only teleports 1 random person... any suggestions?

BTW: this does work, just doesnt teleport all , just 1 person at random ^

for n, Player in pairs(Players:GetPlayers()) do
        if Player.Character ~= nil and Player.Character:FindFirstChild("Humanoid") then
            Player.Character.HumanoidRootPart.CFrame = game.Workspace.Spawner.CFrame

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago
for i = 1,15 do
    for i,v in pairs(game.Players:GetPlayers()) do
        if v.Character and v.Character:FindFirstChildOfClass("Humanoid") then
            pcall(function()
            v.Character:MoveTo(workspace.Spawner.Position)
            end)
        end
    end
    wait()
end
0
Why are you teleporting all players 15 times? karlo_tr10 1233 — 4y
Ad

Answer this question