Can you fire a RemoteEvent in the PlayerRemoving function?

I have made a code that should fire a remove event when the player is leaving, last time I tried to do that didn’t work, Is there a way to fire it before the player leaves?

2 Likes

This is absolutely pointless to fire a remote when the player leaves.
Use PlayerRemoving signal to detect whenever player leaves the game.

game.Players.PlayerRemoving:Connect(function(plr)
    print('Player ' .. plr.Name .. ' is leaving the game!') 
end)
3 Likes