Why is my debounce not working properly?
02 | local minutes = math.floor(seconds/ 60 ) |
03 | local remainder = seconds % 60 |
04 | local clock = script.Parent.Parent.TextLabel |
07 | script.Parent.MouseButton 1 Click:Connect( function () |
10 | for i = 1 , remainder do |
13 | if remainder - i < 10 then |
14 | clock.Text = minutes.. ":0" ..remainder - i |
16 | clock.Text = minutes.. ":" ..remainder - i |
19 | if remainder - i < 10 then |
20 | clock.Text = "0" ..minutes.. ":0" ..remainder - i |
22 | clock.Text = "0" ..minutes.. ":" ..remainder - i |
31 | clock.Text = minutes.. ":" .. "0" ..( 60 -i) |
33 | clock.Text = minutes.. ":" ..( 60 -i) |
37 | clock.Text = "0" ..minutes.. ":0" ..( 60 -i) |
39 | clock.Text = "0" ..minutes.. ":" ..( 60 -i) |
I did alot of GUI scripts with debounce but this script is the longest. I just cant find out why the debounce doesnt work. Please help thank you.
The output says that line 4 has an error. But without the debounce this script works normally like a timer.