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
3 years ago
Edited 3 years ago

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

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

Answer this question