Issue with Script Updating Intermission

Hello,

I have a problem with my script using a NumberValue called Intermission in Workspace. It kinda works, but when I change the Intermission value from another script or server, it still prints the old value.

repeat
	wait(1)
	intermission = intermission - 1
	print(intermission)
until intermission <= 0

Try including the .Value inside the loop and remove it if you assigned it outside the loop:

repeat
	wait(1)
	intermission.Value = intermission.Value - 1
	print(intermission)
until intermission <= 0

thanks it worked but why is it problem to put Value in variable?

1 Like

When you put the value as a variable outside the loop, it detects the static value it was, with no changes, but when you put it inside the loop, it would detect the value every 1 second so if you changed it midway, it would detect it as it keeps updating.

2 Likes