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
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)