Hi guys! Any ideas why this sometimes works and sometimes doesn't? I have checked with printing that when this is called, at least one player has the value set to true but it still doesn't work :( it works sometimes, though! Any ideas? ANY help would be appreciated! Thanks.

function GetWinner()
for i,v in pairs(game.Players:GetPlayers()) do
	if v:findFirstChild'Playing' then
		if v.Playing.Value == true then game.Workspace.Winner.Value = v.Name       game.Workspace.WinnerID.Value = v.UserId
		else print("No winner")
			game.Workspace.Winner.Value = "NoWinner"
			game.Workspace.WinnerID.Value = 1
end
end
end
end

2 comments

0

Doesn't it awlwat'

0

Add a print after FindFirstChild'Playing' then and tell me if that prints everytime