Something similar to:
https://unity3d.com/learn/tutorials/modules/beginner/scripting/update-and-fixedupdate
what is the function in Roblox lua called?
Something similar to:
https://unity3d.com/learn/tutorials/modules/beginner/scripting/update-and-fixedupdate
what is the function in Roblox lua called?
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.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
The loop method is probably faster than a function call, although
BindToRenderStepallows much more control over the order of various RenderStepped'd functions.