Simple cooldown not functioning

This is a simple cooldown script that uses a value, for some reason the value does not change, I have no idea why.

while script.Parent.Cooldown.Value > 0 do
			local negative_change = (script.Parent.Cooldown.Value-0.5)
			script.Parent.Name = script.Parent.Cooldown.Value
			wait()
			script.Parent.Cooldown.Value = negative_change
			wait()
			print(script.Parent.Cooldown.Value)
			wait(0.5)
		end
local cooltime = 5 --This is a sample number

repeat
cooltime = cooltime - 1
until cooltime == 0
     

Change my variable to your value.Also the guy below me tell you why your script didn’t work

IntValue cant have float number for example

IntValue.Value = 5 -- works
IntValue.Value = 4.5 -- reverts to 5

NumberValue.Value = 5
NumberValue.Value = 4.5
-- both works

Is Cooldown.Value less than or equal to 0 to begin with in the first line? If so then the entire loop wont run.
What value gets printed in line 7 in the Output window?

What is the reason for the script.Parent.Name change in line 3 and what item is this script placed inside?

What is the reason for the 2 wait() lines? You already have a wait(0.5) in there so the 2 wait() lines are not needed.

local cooldown = script.Parent.Cooldown
while true do
    local neg_val = cooldown.Value-1 -- for now I make it 1
    cooldown.Value = neg_val
    print(cooldown.Value)
    if cooldown.Value <=0 then
         break
    end
    wait(0.5)

Have a great day…