I tried to make a model and inside the model there is a humanoid, a part called ''head'' and a script. The health in the humanoid = 100 and the maxhealth = 100. The part called ''head'''s transparency = 0. And i have a sword wich can damage the part until its <= 0 health. So i tried to make the part called ''head'' invisible when it's health = 0 or lower. This is what was inside the script:
function myFunction() if script.Parent.Humanoid.Health <= 0 then script.Parent.Head.Transparency = 1 end end myFunction()
I just started scripting so i'm not the best but can anyone tell me what the problem here is? Thanks :D

2 comments
Are you trying to make a players head invisible?
Please, just please, use code blocks.