Hello developers. I’m trying to achieve a script where if a player dies then it prints out something on the console. I’m just experimenting yet I cannot find a solution.
It is a local script placed in StarterCharacterScripts. Don’t judge I took a break from scripting and now dumb as ever.
game:GetService('Players').PlayerAdded:Connect(function(player) -- When the player joins...
player.CharacterAdded:Connect(function(character) -- Wait for their character to be added
character:WaitForChild("Humanoid").Died:Connect(function()
print("experimental") -- Once they die, do whatever you want
end)
end)
end)