Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Update every frame?

1 answer

✓ Accepted answer

The RenderStepped event of the RunService fires every frame, but in LocalScripts only.

While it is an event you can connect to normally, I usually see scripts that look like this:

while true do
	game["Run Service"].RenderStepped:wait()
	-- do whatever
end

I'm not really sure which would be considered "better", though I think the way with the loop is much more straightforward.

1 comment

1

The loop method is probably faster than a function call, although BindToRenderStep allows much more control over the order of various RenderStepped'd functions.

This discussion is preserved as it was. New answers, comments, and votes are closed.