Why my check if available click is more than 0 not work? I got -1
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.
1 | script.Parent.MouseButton 1 Click:Connect( function () |
2 | if script.Parent.Parent.TextLabel.Value.Value > 0 then |
3 | script.Parent.Parent.TextLabel.Value.Value = script.Parent.Parent.TextLabel.Value.Value - 1 |
And here is script that set text to click available
2 | script.Parent.Text = "Click available: " ..script.Parent.Value.Value |
I have a NumberValue in TextLabel. Its name is "Value"