I had an error on this script, but I don't know what is wrong with it. This is the part where it had an error:
local randomspawn = lobbyspawns[math.random(1, #lobbyspawns)]
player.Character:MoveTo(randomspawn.Position)
local backpack = player:FindFirstChild("Backpack")
if backpack then
backpack:ClearAllChildren()
end
end
end
killer = nil
sheriff = nil
This is the error:
18:27:57.937 - ServerScriptService.MainScript:458: bad argument #2 to 'random' (interval is empty)
18:27:57.939 - Script 'ServerScriptService.MainScript', Line 458
18:27:57.941 - Stack End

2 comments
Make sure lobbyspawns is a table as well has an amount over 1.
What do you mean as a table?