I've tried this but it didn't work.
while wait(1) do
local player = game:GetService("Players").LocalPlayer
local humanoid = player.Character.Humanoid
if humanoid.Health == 0 then
wait(6)
mouse.KeyDown:Connect(function(key)
if key == "e" then
if mouse.Target then
humanoidRoot.CFrame = CFrame.new(mouse.Hit.x,mouse.Hit.y + 5,mouse.Hit.z)
end
end
end)
end
end

4 comments
humanoid.Died:Connect(function()
That didn't work
if Died doesn't work, myb HealthChanged
Doesn't that work all the time even if the player dies and even without the humanoid.Health ==0?