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

Trying to make it so if the player has already voted he cant vote again. no error why no work?

Asked by 4 years ago

When removing the part that checks if they already voted they can still add a value to the gui ot click it but when i added the top part that checks when i try to vote it doesnt work.

VOte option 1:

01if game.Players.Localplayer.PlayerGui.Modes.Classic.ImageButton.Script.Disabled == true then
02    script.Disabled = true
03else
04    if workspace.Timer.Value >= 0 then
05        function leftClick()
06            workspace.CatMaidMania.Value = workspace.Classic.Value + 1
07            script.Disabled = true
08        end
09    end
10end
11 
12script.Parent.MouseButton1Click:Connect(leftClick)

Vote option 2:

01if game.Players.Localplayer.PlayerGui.Modes.CatMaidMania.ImageButton.Script.Disabled == true then
02    script.Disabled = true
03    else
04if workspace.Timer.Value >= 0 then
05    function leftClick()
06    workspace.Classic.Value = workspace.Classic.Value + 1
07    script.Disabled = true
08    end
09    end
10    end
11 
12    script.Parent.MouseButton1Click:Connect(leftClick)

Im fairly new to scripting; messy code :p

0
why would a part check if someone already voted? just use a bool value and set the name of the value to the player name that voted, then check the value and if its already true, then they already voted AlexanderYar 788 — 4y
0
heh thanks i dont know what a bool value is but ill look it up on youtube and on the dev forum Radiant_Sparkles 69 — 4y

Answer this question