How to get CPU usage of a player

Hello, I’m trying to make an anticheat by getting the local player’s cpu usage but I do not know how.

  1. What do you want to achieve? Keep it simple and clear!
    I want to know the local player’s CPU usage.
    pngthing4
    I’ve noticed that when a player “tab glitches” the cpu usage of the player goes extremely high, so this is the reason why I want to know the cpu usage of the local player
  2. What is the issue? Include screenshots / videos if possible!
    There is no direct or precise way to get the player’s cpu usage, and I am not sure how to get an approximate guess of the cpu usage.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I am unable to find any solutions on the developer hub.

You can’t get the player’s CPU usage.

1 Like

Yes but is there an approximate way to get it?

Edit: I have found games that display CPU usage in 2023 but they became private

I can’t find any (and I do not know any way to do it), sorry about that D:

Edit: Actually, there is a method to get the memory usage of your game by doing game:GetService("Stats"):GetTotalMemoryUsageMb(). Memory usage is similar (?) to CPU usage, so I guess you could use it.

Source for the edit:

1 Like

This would be an inefficient way of checking whether they’re tab glitching, no? There are better methods you could use.

You could use a remote to check whether the player is responding. However, this could also result in laggier players being punished.

CPU Usage shouldn’t be your main course of action when checking if they’re tab glitching. Look for other methods.

This wouldn’t work as well as you’d think.

When the client holds the top bar, your code wouldn’t run on their machine making this effectively useless. How would memory usage play into this if they client isn’t running anything?

I got the source from another post, don’t blame me.

I have just realized that figuring out the local player’s cpu usage won’t work because

3 Likes

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