Loops using run service have inconsistent delay

I’ve recently noticed that loops that use run service end up having some random delay that prevents objects from updating properly. Though it seems that if you put your cursor around the object that has the delay it seems to somewhat fix itself.

here’s a video showing what I mean:

here’s the game I used to replicate the bug:
roblox runService loop bug.rbxl (60,1 KB)

1- test on studio and open the player’s gui to see the timer number value as shown in the video to compare the number value and text label that is supposed to replicate said value

2- press the start button and over time the number value in the player’s gui and the text label that is supposed to update when said value changes seems to slowdown and show wrong values

Expected behavior

I expect the text label in the player gui to show the accurate number value. Instead it almost always is showing the wrong value.

This isnt a studio bug, you’re just using RunService incorrectly for this case.

Your trying to accurately increment a number by 1 every second via RunService.RenderStepped, which fires around 60 times a second, It’s usually never a perfect fixed framerate, so some variation is expected when you use a debounce with task.wait(),


Oh, if that’s the case I’ve always been using run service wrong for practically years now. Will set your replay as the solution, thanks for letting me know.

1 Like

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