I'm trying to make it so that when you click a group of objects the transparency of the group changes. I've tried:
local Group = script.Parent function onClick(brick) Group.Transparency = 1 end
I looked for tutorials everywhere but nobody is showing what I'm trying. Help?
So put the parts inside a model and name the model whatever you want, then with the button you want to use to make these parts invisible, insert a script and a click detector. open the script and paste this :
local Group = script.Parent.Parent.PARTSGROUP:GetChildren() ---Name of the model the parts are in (Get children gets everything inside the model) function onClick() for _,v in pairs(Group) do v.Transparency = 1 end end script.Parent.ClickDetector.MouseClick:connect(onClick)
(PARTSGROUP is the name of the model with the parts inside, change this to the name of the model)
(I made it script.Parent.Parent so the button wont be affected, you can change this if you want, but if you keep it like this, then group the model with the parts in with the button together.)