Whenever, I delete my character with :Destroy or :Remove, and the like, the CharacterRemoving does not fire.

Is there anything else I could use to get it to fire, even when it is destroyed with :Destroy.

local Players = game:GetService("Players")
 
local function onCharacterSpawned(player)
    print(player.Name .. " is spawning")
end
 
local function onCharacterDespawned(player)
    print(player.Name .. " is despawning")
end
 
local function onPlayerAdded(player)

    player.CharacterAdded:Connect(function ()
        onCharacterSpawned(player)
    end)

    player.CharacterRemoving:Connect(function ()
        onCharacterDespawned(player)
    end)

end

2 comments

0

Provide us with the code you are using so we can replicate the problem.