Is there a way to check if the leave game button is pressed on the escape menu? I’ve been thinking about it and it seems like it would be a problem if someone were to attack you in game when you leave. I’m just curious about this.
There isn’t a way to check when someone presses the leave button, but there is a way to check when someone leaves the game.
You can use the event as seen below to see when a player leaves:
game.Players.PlayerRemoving:Connect(function()
-- Your code here
end)
You can read more about it here: Players | Roblox Creator Documentation
Haven’t thought about that. I’d just assumed that because you could disable the reset button that there was some way to access the leave button too. Though I guess if there was a PlayerAdded function there would be one for the opposite