20 Hz RunService Event

Currently on Roblox, it’s too hard to set up a 20Hz game loop on the server side.

IIRC, remote functions and events / replication happens 20 times a second, whereas Heartbeat is fired 30 times a second (roughly):

Since I don’t want to be using more CPU time than necessary, I want to update my game objects on the server at 20Hz rather than 30Hz, so that the updates line up with the replication. However, to my knowledge, no 20Hz step event exists for me to use, so I have to settle for the 30Hz Heartbeat event, which is less than ideal:

This misalignment between my game’s update code and replication means that objects in my game can appear ‘laggy’ and may stutter.

If an event was added that instead fires at 20Hz, this problem would go away:

43 Likes