How can I make a script where a script will run when the player dies? ex: when that player dies a script will run or just print(yes)
maybe like an OnDiedScript or something Like that.
A more polished version of the answer above me. (Assuming you've allready set a "Player" value.)
local Humanoid = Player.Character:WaitForChild("Humanoid") Humanoid.Died:Connect(function() print(Humanoid.Parent.Name .. " has died.") end)
game.Players.LocalPlayer.Character.Humanoid.Died:Connect(function() this will run once the local player has died