Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why onCharacterRemoving doesnt trigger Anymore after spawing Character Manually ?

Asked by 3 years ago
Edited 3 years ago

Need help please ! I'm spawning my Characters manually with player:LoadCharacter() But when the Character Dies, It doesnt trigger onCharacterRemoving Anymore..

Thats my code when the player Die

local player = game.Players.LocalPlayer
local char = player.Character
local humanoid = char:WaitForChild("Humanoid")

char:WaitForChild("Humanoid").Died:Connect(function()
    --player.PlayerScripts.isAlive.Value = false
    wait(1.3)
    char:Destroy()
    player.PlayerGui.MainMenu.Enabled = true
end)

Answer this question