Loops acting crazy..?

Hi, I just spent the past 3 hours tearing my hair out of my head… Basically I have this loop running:

while true do
	local rand = math.random(100000)
	print(0,rand)
	wait(3)
end

The output in-game:

image

As you can see the script ends up running twice?? Btw this also only happens in-game. What’s going on :sob:

What type of script and where is it? And is that the entire script that you posted?

Why did you delete? You said something about a dev console error?

I thought it could be related to the latest change to developer console but I wasn’t certain and posted prematurely, the post I linked was this:

2 Likes

Was my first intuition as well.

1 Like