Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Why is my voting script not working?

Asked by
Perci1 4988 Trusted Moderation Voter Community Moderator
11 years ago

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.

01local h = Instance.new("Hint")
02 
03function countdown(cTime)
04    h.Parent = workspace
05    for i = 1,cTime do
06        h.Text = tonumber(cTime - i)
07    end
08end
09 
10function votingVisible(bool)
11    for i,v in pairs(game.Players:GetPlayers()) do
12        v.PlayerGui.ScreenGui.Voting.Visible = bool
13    end
14end
15 
View all 26 lines...

1 answer

Log in to vote
1
Answered by 11 years ago

You should add a variable at:

1game.Players.Changed:connect(function()

Like:

1game.Players.Changed:connect(function(a)

Normally errors appear at Developer Console

To see it, press F9.

Also... Shouldn`t you think after 2 players on the game?

0
"Shouldn't you think after 2 players on the game" What do you mean by this? Perci1 4988 — 11y
0
I got it to work, no thanks to anyone on this website, but I appreciate you trying. Perci1 4988 — 11y
Ad

Answer this question