Player.CharacterRemoving Example Code Has Logical issue

https://developer.roblox.com/en-us/api-reference/event/Player/CharacterRemoving

The function called when CharacterAdded is fired is onCharacterDespawned when it should be onCharacterSpawned.
image

7 Likes

That’s because you’re calling characterDespawned in both the character removing & characteradded function.

This post isn’t about code he’d written - he’s pointing to the code example on the devhub, which contains a small mistake (which you and the OP have pointed out).

2 Likes