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

Bad Arguement (Interval Is Empty)?

Asked by
Fxicity 10
4 years ago
Edited 4 years ago

Im making a hide 'n' seek game and i keep getting this error. Here is the line of code causing the error.

1local function teleportPlayers(availablePlayers,spawns)
2    for _, plr in pairs (availablePlayers) do
3        if plr.Character then
4             if plr.Character:FindFirstChild("HumanoidRootPart")
5                plr.Character.HumanoidRootPart.CFrame = spawns[math.random(1, #spawns)].CFrame + Vector3.new(0,5,0)
6            end
7        end
8    end
9end
0
thats only part of the code btw Fxicity 10 — 4y

Answer this question