How to detect if a player is afk?

Hello. I try to detect if a player is afk, but there are so many obstacles upcoming in my way.
If you have any ideas please suggest down below this post.
Thank you. :slight_smile:

Thank you for mentioning. I will move it right now

But if a player uses an automatic key presser? Inputs will be fired yet he doesn’t really do much.

But what if they use an auto key presser?

You can even make a script based on player’s position and key type.

If the player is not moving and sending the same input for a long time.
A message can appear saying “Are you a bot?” or “The system has detected you to be afk”. And only till they type “No I’m not afk” the player’s stats cannot increase.

This may help I guess.

There is no reassuring way to detect if the player is using an auto-clicker. Some people naturally have high CPS (clicks per second). The most you can do is detect whether or not they are moving and pressing inputs

I personally don’t prefer this idea, as it is an inconvenience for the players