When I click a button in my game's workspace, I made it set a value to 300 (this works fine) however the countdown script that I put inside the value does not work and I can't understand why. I want it to countdown from whatever number it is at until it is 0. I have tried repeat until the value equals 0 and the countdown just keeps going.
while true do
if script.Parent.Value > 0 then
script.Parent.Value = script.Parent.Value - 1
wait(1)
end
end

1 comment
you can make something like that: if value = 0 then remove the countdown.