for some reason I cant seem to loop true players can someone help me with this. This is what I tried.
if #game.Players:GetChildren() >= playersNeeded then
local BestClicks = 0
local BestClicksPlayer = ""
for i,v in pairs(game.Players:GetChildren()) do
if v.PlayerValues.Clicks.Value > BestClicks then
BestClicks = v.PlayerValues.Clicks.Value
BestClicksPlayer = v.Name
end
end
print(BestClicksPlayer,BestClicks)
status.Value = BestClicksPlayer.." is the winner!"
wait(5)
else
status.Value = "Not enough players game stopped"
end