How do I make it so that my Bank vault's head part un-anchors when the health is on 0. I've had multiple attempts on doing this and still no luck.
This is the explorer:
Workspace> BankVault>Humanoid, script, Head>Smoke, Part, Part, Part, Part, Part
BankVault is a model, Head is a part which has other parts inside of it, there's smoke particles because i made it so that if the health is under half of the original health, there would be smoke particles. "script" is the script I'm trying to make to cause this to function:
local hum = script.Parent.Humanoid
hum.HealthChanged:connect(function(health)
if hum.Health == 0 then
game.Workspace.BankVault.Head.Anchored = false
wait(5)
game.Workspace.BankVault.Head.Visible = false
end
end)
Much appreciated if you help :)
-c_omb

2 comments
Any errors in output?
No errors.