Why is my voting script not working?
I get no errors or anything. Please help.
It's funny, when I take out the Changed event and just test it by disabling/enabling the script, everything works fine.
01 | local h = Instance.new( "Hint" ) |
03 | function countdown(cTime) |
06 | h.Text = tonumber (cTime - i) |
10 | function votingVisible(bool) |
11 | for i,v in pairs (game.Players:GetPlayers()) do |
12 | v.PlayerGui.ScreenGui.Voting.Visible = bool |
16 | game.Players.Changed:connect( function () |
17 | if game.Players.NumPlayers = = 1 then |
19 | h.Text = "Waiting for 2 players." |
21 | elseif game.Players.NumPlayers = = 2 then |