RunService.RenderStepped( double step )
Fires every render frame, which is approximately 1/60th of a second. step is the amount of time that elapsed between the last render step and this render step.
RunService.Heartbeat( double step )
Fires every frame. The step argument indicates how much time has passed between frames. This is usually around 1/60th of a second. Please note that this will vary depending on the performance of the machine. If the game is only running at 40 FPS, that means that Heartbeat will fire 40 times per second, and the step argument will be roughly 1/40th of a second.
RunService.Stepped( double time, double step )
Fired on every "step" in the RunService, a time of approximately 1/60th of a second.
You can bind wait to one of these events to make the script yield until the event has passed like so:
game:GetService("RunService").RenderStepped:wait()
or
game:GetService("RunService").Heartbeat:Wait()
(Wait's first letter can be uppercase if you want)
1 comment
wait() will not run faster than 1/30 no matter how small a number you give. Simply, some things look fine at a slower speed.