Value wont change

I want to make a script that changes a numbervalue by negative one when a boolvalue is true
this is my script its a server script and its in serverscriptservice

local rp = game.ReplicatedStorage
local power = rp.System.Power
local close = rp.System.Closed

while close.Value == true do
	power.Value -= 1
1 Like

Is close’s value true by default? If it’s not, the loop will never run. You have to listen for when close’s value changes

1 Like

No it was false by default i fixed it now thanks for helping me

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.