I want to send local script data to the server when the player leaves, but when I try to use a remote event with the PlayerRemoving event it just doesn’t work, so I thought the remote event was destroyed before PlayerRemoving fired, but when I try to print it , it shows in output. Here are the scripts:
Why are you firing a remote event from the client to the server when the player leaves? Just connect a .PlayerRemoved() event on the server and do all the work you need there?
Yeah, this needs to be handled by the server. Even if you could fire a remote when someone leaves, it wouldn’t work if their game crashed or they used alt F4.
An exploiter could just change that value, leave the game and then it’ll save it for them. There’s absolutely no reason why you should trust the clients info, let alone save those values directly. All data-related things should be handled on the server.
Since the addition of player to remote events you can secure events better, some ammount of client to server communication is unavoidable, but I think its pointles saving when they leave as data should be saved regularly anyway
When the player leaves local scripts remove themselves, as far as I know majority of the script after a player has left are removed within a milisecond.
So basically what your trying to acomplish is just a needless use for a script.
You could probably stall for time using require but without the client actual present it wouldnt run anyway
Hope this helps you understand why we are all saying its pointless to even try to do it