I am trying to create a spaceship using roblox’s humanoid system because it has settings prebuilt into it which make coding it easier.
However, I cannot make a function fire when the humanoid dies, even though I included a script into the spaceship which does :TakeDamage(60) twice. the Ship’s maxhealth is currently 100, so the ship dies in two instance of :TakeDamage(60).
The function I made which is connected to .Died is supposed to print “Died.” for testing purposes. However, it just does not work, despite the humanoid’s health going to 0.
My Workspace
My Code in short
local myHuman = myModel.Humanoid
myHuman.Died:Connect(function()
print("Died")
end)