I have this teleport script that runs every 60 seconds, but for some odd reason, it doesn't teleport anyone in an actual server, even though it does work while testing in studio.
function tp() local teleport = Vector3.new(0,2,0) local players = game.Players:GetChildren() for i = 1, #players do local player = players[i] local humanoidrootpart = player.Character:FindFirstChild("HumanoidRootPart") humanoidrootpart.CFrame = CFrame.new(teleport) teleport = teleport + Vector3.new(0,5.5,0) end end
It worked fine before I added
teleport = teleport + Vector3.new(0,5.5,0)
and moved
local teleport = Vector3.new(0,2,0)
into the function (it was outside before) but I don't understand how that would ruin the script.