I am scripting a game points system but it's not working and the error 12:02:10.739 - Workspace.CurrentObby.Obby1.ObbyScript:20: attempt to get length of field 'TempContestants' (a userdata value) shows. Here is my script
Obby = script.Parent
Functions = require(script.Functions)
Obby.End.Touched:connect(function (hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum then
local player = game.Players:GetPlayerFromCharacter(hum.Parent)
if player then
Functions:AddWinner(player)
end
end
end)
for i = Obby.ObbyInfo.Time.Value, 1, -1 do
if i == 1 then
_G.Msg("The current game will end in".. tostring(i) .. "seconds")
else
_G.Msg("The current game will end in".. tostring(i) .. "seconds")
end
if #Obby.ObbyInfo.TempContestants <= 0 then
break
end
wait(1)
end
Obby.ObbyInfo.Finished.Value = true
Please help asap :)
Thanks!

1 comment
THANk you so much! I will try this, sorry for the late reply