local Morpher = script.Parent function onTouch(Brick) for item, child in pairs(Brick.Parent:GetChildren()) do if child.ClassName == 'Hat' then child.Name = "Cap" child.Handle.Mesh.MeshId = "http://www.roblox.com/asset/?id=16190466" child.Handle.Mesh.TextureId = "http://www.roblox.com/asset/?id=51278992" end end end Morpher.Touched:connect(onTouch)
Any errors? I cant see anything wrong with it. Maybe
child.ClassName == 'Hat'
Should be
child:IsA("Hat")
?