I'm trying to edit a NumberValue with a localscript inside (I'm making a tool) but it doesn't change it. What it is suposed to do is lower a numval named CD(The parent) to 0 but it stays at 10.
local cooldown = script.Parent
while true do
wait(1)
if cooldown.Value >= 1 then
cooldown.Value = cooldown.Value - 1 --I have tested this with print, and that works.
end
end
I'm probably doing a dumb mistake since i'm tired.

2 comments
What's your hierarchy
LocalScripts only run on the server