Knowing if a player paused the game

How would i know if someone paused the game/open the esc menu, i know i could use Input for esc but that wouldnt register on mobile or just clicking on it

Here’s a devhub topic that might help:

UserInputService | Roblox Creator Documentation.

You could use a True or False value and determine if they pressed the key ESC for the menu. Then you can do your script from there.

This only fetches when the player goes off the Roblox Game, not leaving the server but switching tabs to check some things. You can commonly see this being used in games with AFK user tags!

Yea i guess that might work but the problem would just be that if u tap the logo in the upper left or if u r on mobile

I believe you can use GuiService.MenuOpened and GuiService.MenuClosed.

Docs:

RBXScriptSignal MenuClosed()
Fires when the user closes the Roblox coregui escape menu.

RBXScriptSignal MenuOpened()
Fires when the user opens the Roblox coregui escape menu.

4 Likes

you can use gui service to detect this.
image
these events should help you

2 Likes

thats exactly what im looking for thanks

1 Like