Checking in User is not Focussed on Roblox

I am currently trying to build a system where is they leave the Roblox player then they get a tag above their tag that reads “AFK”.

I know how to do everything else, but is it possible to check when a user has left the Roblox player?

Are you talking about the PlayerRemoving Event…?

No.
I mean if I player is playing Roblox then they switch to a different tab for example:

I am playing Roblox, then I switch to Discord then back to Roblox

Oh, I think this could be what you want then?