I just try if Click Available is more than 0 , it will add 1 score. It should be 0 but I got -1.

Here is button script.

script.Parent.MouseButton1Click:Connect(function()
	if script.Parent.Parent.TextLabel.Value.Value >0 then
		script.Parent.Parent.TextLabel.Value.Value = script.Parent.Parent.TextLabel.Value.Value - 1
	end
end)

And here is script that set text to click available

while true do
	script.Parent.Text = "Click available: "..script.Parent.Value.Value
wait()
end

I have a NumberValue in TextLabel. Its name is "Value"

3 comments

0

You are - 1 from the value. Also do not use loops there is the changed event or even beter just update the text in the click function

0

@kingdom5 I try :GetPropertyChangedSignal("Value") but still not work.

0

Sorry i forgot that I got -1 when I use macro and ping is 300+ I think it is because the lag.