This is it:

local DeBounce = false


if game.Workspace.Values.OnOff.Value == 1 then
	if not DeBounce then		
		DeBounce = true		
		game.Workspace.Values.GameProgress.Value = game.Workspace.Values.GameProgress.Value + 1	
		wait(1)
		DeBounce = false
		print('Running')
	end
	
end

It is supposed to detect when a value is 1 then it adds 1 to another value (I'll change it to a remote function later)

4 comments

0

It's because the script runs through the if then statement once. It doesn't wait until the value is 1 unless it was 1 when the script was run.

0

That's at least what I think

0

do I need a If true then statement?

0

You'd need a listener for the Value property change. Then compare if it's 1.