RunService.Heartbeat() gives wrong delta value

As you all know, hearbeat gives a delta parameter, which is the time in seconds between each frame.

Here it is the expected output at 60 FPS when printing it out:
image

When using an FPS unlocker, this value is still the same:

As you can see, despite having 100+ FPS, the delta value is still approximately 1/60. This may be a bug, or it may be intended. If this is a bug, I do not have permissions to post there yet.

The method that I increased the FPS was by modifying the game client settings directly. While definitely not intended by ROBLOX, many of my players use this method, so I do need some sort of solution.

I realise I could use while loops instead, but I’d rather not clutter up my code with loads of coroutines.

Heartbeat runs at 60hz when possible on the client. RenderStepped is what you’re looking for if you’re wanting it to be tied by framerate.

I’m using a shared module (required by both the server and client). RenderStepped isn’t allowed on serverscripts. Is there another way round this?

If you’re running heartbeat on the server, it’ll run at 30hz regardless.

I’m pretty sure it runs on 60Hz.

Either way, serverscripts aren’t the issue here. It’s when the module is required by a localscript problems arise.

Correction: I’ve made a mistake, the delta is displaying correctly. I was checking serverlogs instead of clientlogs.

oops

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.