As the title sais, the following script won't work:
local Log = script.Parent.Head
function onTouch (Brick)
if Log.Parent.Humanoid.Health == 0 then
local Fire = Instance.new("Fire", script.Parent.Head)
Fire.Size = 10
Fire.Color = Brick.color:Random()
Fire.SecondaryColor = Brick.Color:Random()
wait(2)
Fire:Remove()
end
end
Log.Touched:connect(onTouch)
ok so I want it so when the health is 0 it lights up fire. But the problem is I can't Damage the Model... Can you help me please?

7 comments
plz put the code in code block
done.
what do you expect with the code
Read the Desc.
so do you want to do it. When you're dead and you touch a brick, your head will be in fire?
I need it so, I can Damage the Model, Even though I've inserted a Humanoid I can't Damage it
or do you want to kill a guy and make his head to fire?