Im learning how to script, and one of the things that has me stuck is run-service as a whole. I dont really understand any of the main functions like RenderStepped, Heartbeat, and Stepped. I tried reading up on it on DevHub RunService | Roblox Creator Documentation -The thread i read
If theres any way i’d like to know what these functions do (please try to simplify it ) and i’d also like to know how they could be applied in games
RunService.RenderStepped - Runs evertime a new frame is rendered on the client’s device, for example if someone has 60 fps (frames per second), this event runs everytime a new frame is rendered, thus 60 times per second. This runs everytime rightbeforethe frame isrendered.
RunService.Stepped - In each render like is used in renderstepped, things happen, objects fall down if they were in the sky, etc., physics are applied on them, RunService.Stepped runs right before the physics take effect every frame.
RunService.HeartBeat - Same as .Stepped, but runs everytime right after the frame’s physics are finished.
If the client’s roblox is running on 60 frames per second, it will, for a clearer visualisation of what happens when in the rendering/physics loop that happens x times per second depending on the refresh-rate of the client, see the image above posted by Benified4Life