local part = script.Parent part.Touched:connect(function(hit) if hit.Parent then if hit.BrickColor == "Dark orange" and hit.Material == "Wood" then hit.Parent.BrickColor = BrickColor.Black() end end end)
It's supposed to, when a part is made of dark orange wood, "burn" it. There are no errors in the output.
Thank you in advance for any help you may provide.
You forgot to check if a humanoid has checked it, you use ontouch function and get the parent of what hit it returning the humanoid.
function onTouch(part) local humanoid = part.Parent:FindFirstChild("Humanoid") -- used to find humanoid in player ontouch local block = script.Parent if (humanoid ~= nil) and block.Material == Enum.Material.Wood and block.BrickColor == BrickColor.new('Bright orange') then -- Enum to check material requirement, BrickColor.new for part color requirement block.BrickColor = BrickColor.new('Black') end end script.Parent.Touched:connect(onTouch)