Checking lag ingame

Okay, so occasionally ingame my lag will spike then lower again, I cant seem to find the issue and I am wondering if there is any way to find lag, and find out which script it is coming from?

What do you mean by “lag” as this could mean many different things. If you are talking about framerates, you can calculate the delta between frames by subtracting the current tick() from the previous one. This will provide you with a metric of the player’s framerates. Additionally, if you want the server’s performance, you can use the heartbeat to determine its performance.

1 Like

All of these are part of RunService by the way. They are called RenderStepped and Heartbeat.

You can also have the player ping the server with a remote function and measure the response time for their connection.

To find laggy scripts you could open the dev console in-game and look for scripts with high activity.

Yeah, and that would measure the ping. Also, roblox provides a bunch of tools for performance under the “View” tab, such as “Script Performance” and all of the stat tools.

1 Like

Ah okay yeah that seems to be it, thank you.

1 Like

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