Int value keeps getting reset to 0

As soon as I start my game, the value of my int gets reset to 0
Here is the code I have attached to the int which purpose it to be a timer:


script.Parent.Value = 100

while true do
	for i = 100, 1, -1 do
		script.Parent.Value = "Your key will be generated in "..i
		wait(1)
	end 
	wait(1)
	end 

I made a fresh game with only the timer and the issue still occurs so it is not an external script getting in the way

This is because script.Parent is an IntValue. It only accepts numbers not strings. I suggest changing it to StringValue instead as it supports both numbers and strings.

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