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.