I have a issue with my script. I need help!!!
for _, player in pairs(activecontestants) do
if player then
awardpoints(player, 1)
if player.Character then
local humanoid = player.Character:FindFirstChild("Humanoid")
if humanoid then
humanoid:UnequipTools()
end
end
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
The error is on line 11. This is a part in a long script and it is going to teleport players in my game back to the lobby and get players points for surviving the game and get rid of any tools when they spawn into lobby
Hope you can help :D

6 comments
Can we get more code?
sure
Any chance we can see the full error, what line it errored on. As well as further explanation as to what the script is is supposed to do in the first place.
How are you getting the value for lobbyspawns?
this is like the main script for the game so its like 484 lines. Do you want me to post the whole script??
No, but if it's erroring that the second argument is bad then the table for lobbyspawns is not being utilized correctly.