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

Render stepped explanation?

Asked by 8 years ago

I've read the wiki and it told me what RenderStepped is, i know it can only be used in a local script. I know it wait 1/60th of a seconds. But i don't know how to use it properly, if there is any tips you can give me, i appreciate it. Thanks~!

1 answer

Log in to vote
2
Answered by 8 years ago

RenderStepped is a RBX.Lua function that will fire an event every render frame. A render frame is approximatley every 1/60th of a second. With this being said you must be careful what you use renderstepped with. RenderStepped should be used with practical things, or you could crash your studio. To access RenderStepped you have to use the RunService. This would be done like this:

local renderstep = game:GetService("RunService").RenderStepped

Now that you have renderstepped define, you can now use it in a function

local renderstep = game:GetService("RunService").RenderStepped

renderstep:connect(function()
    print("This is a renderstepped print")
end)

This will print every 1/60th of a frame. Using renderstepped is rather simple, but as i said before, be cautions of how you use it.

~~KoolKid

0
ty kiu~~! u helped a lot~~! FlaminSparrow 65 — 8y
Ad

Answer this question