Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

what is RunService? And what does RunService do?

Asked by
Grazer022 128
3 years ago

I’ve seen some youtubers using this type of Service. Now i’m interested in learning RunService too. I would appreciate it if someone could explain this in a detailed way. Thanks!

0
Thanks! Grazer022 128 — 3y

1 answer

Log in to vote
2
Answered by
NordicM 77
3 years ago

RunService has many events, so it's hard to explain all of them... The most used one in my opinion is RenderStepped (RunService.RenderStepped). This is used in localscripts and is a great way to make a forever loop. If you put a function inside of the event...

game:GetService("RunService").RenderStepped:Connect(function()
    print("Hello World")
end)

It will run every frame. If you don't know what frames are, they are like moving pictures that continuesly goes (On roblox it is max 60 frames per second, unless you use a rbx unlocker)

0
I like NordicM's explanation. Developers use `RunService` to make things smoother in their game. For example, if I was trying to code being able to move furniture by moving my mouse, I would use `RunService` to help make the furniture move smoothly along with my mouse. AntiWorldliness 868 — 3y
0
Thanks a lot for the help! Grazer022 128 — 3y
Ad

Answer this question