So, I have this script here, that changes the mesh of any brick that touches it. However, I do not know how to make it specific to a certain type of brick. For example, only when a brick called "Tycoon brick" touches it, it only effects that brick; and when bricks like those that are part of characters touch it, it does not change their shape. This is what I have to start, but I don't know how to make it brick specific.
z = script.Mesh function onTouched(part) z = z:clone() z.Parent = part end script.Parent.Touched:connect(onTouched)
Basically, the mesh is inside of this script, if that helps!
All you have to do is check the name of the part which touched with an if statement.
z = script.Mesh function onTouched(part) if part.Name == "Tycoon brick" then z = z:Clone() z.Parent = part end end script.Parent.Touched:connect(onTouched)
Hope this helped.