In my game, some Tools’ assets can stay on map if player will leave when using them. How can I make sure so player’s Tools can finish their scripts if player suddenly leaves and their character is about to be destroyed?
Im pretty sure you can use character removing and then destroy everything in the players backpack. Sorry if i misunderstood ![]()
The problem is vice versa: I need for tools to finish their effects before being removed.
1 Like
Oh ok, my bad.
Maybe you can fire a remote event when the player is removed or the character is removed, whichever works for you. This is assuming you have a client script and server script.
Otherwise, you can probably just use a character/player removing function within the tools script, then make the effects run in that function