My Clicker Game Has A Problem..?
I'm making a clicker game, and I don't know how to make this shop function work. Basically, there is a textbutton that gives you a boost for each click, but you have to have 100 clicks for it. It does detect the 100 clicks, BUT, then I can press it over and over again, even if I am under 100 clicks. Can anyone help? Here's my current script:
01 | local player = game.Players.LocalPlayer |
02 | local clicks = player.leaderstats.Clicks |
04 | script.Parent.Activated:Connect( function () |
05 | if script.Parent.Activated then |
06 | script.Parent.Activated:Connect( function () |
07 | clicks.Value = clicks.Value - 100 |
08 | script.Parent.Parent.click.Activated:Connect( function () |
09 | clicks.Value = clicks.Value + 1 |
13 | if clicks.Value > = 100 then break |
BTW: I am not asking for a whole new script, I just need to be guided in the right direction. Thank you!