Stay the server open for few seconds when the player leaves. Can anybody help?
Asked by
5 years ago Edited 5 years ago
I think it is from ReplicatedFirst, I guess.
So I was making a script to save a player's data when leaving. I had to save a tool that a player might have. There are two chances. One is not holding the tool and one is holding. I know that it goes to player.Backpack when not held, and if it is held, it will stay inside the player's character. So I used player.Character to get the character, I tested it, but it didn't work. The output said attempt to a nil value 'Character' which I noticed that the Character is already gone. I think I remember there was a method: 'Even though the (last) player leaves, the server stays open so that they can save data' I think heard it from a YouTube video but I don't remember what channel it was, and what video it was so can anybody help???
Short: Way to leave the server open though the player leaves