I have a door model,and the doorknob haves Humanoid and the part of it is called "Head" ,the door part is called "Torso",So,the doorknob receives the damage correctly,but the door doesn't open,help!
while true do
if script.Parent.Humanoid.Health <= 0 then
script.Parent.Torso.CanCollide = false
script.Parent.Torso.Transparency = 1
script.Parent.Head.Transparency = 1
script.Parent.Door2.CanCollide = true
script.Parent.Door2.Transparency = 0
script.Parent.Handle2.Transparency = 0
end
end

4 comments
You might want to look into event listeners. Also, this script should've crashed your studio. If you have an infinite or extremely extensive loop with no delay, studio will crash.
https://developer.roblox.com/api-reference/event/Humanoid/Died
phleg event listeners is just a complicated way to say event right?
oh nvm