I have this very simple local script located under a ScreenGui in PlayerGui. But it is not printing “Dead” when the Humanoid dies. I’m unsure why this is the case.
It works when the local script is in StarterCharacterScripts, but not under PlayerGui?
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local Humanoid = character:WaitForChild("Humanoid")
local function OnDeath()
print("Dead Now")
end
Humanoid.Died:Connect(OnDeath)