How can I clean up this code? I’m trying to make a mineable ore, but when you finish mining it, only the base stone mesh disappears. Instead of referencing each and every part on the ore, how can I reference them all at once to make my code cleaner?
code:
script.Parent.Parent.Ores.Part1.Transparency = 1
script.Parent.Parent.Ores.Part2.Transparency = 1
script.Parent.Parent.Ores.Part3.Transparency = 1
script.Parent.Parent.Ores.Part4.Transparency = 1
script.Parent.Parent.Ores.Part5.Transparency = 1
script.Parent.Parent.Ores.Part1.CanCollide = false
script.Parent.Parent.Ores.Part2.CanCollide = false
script.Parent.Parent.Ores.Part3.CanCollide = false
script.Parent.Parent.Ores.Part4.CanCollide = false
script.Parent.Parent.Ores.Part5.CanCollide = false