You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
Use two seperate buttons within a model to change the transparency of all bricks within a given model from 0.5 with one button to 1 with the other button -
What is the issue? Include screenshots / videos if possible!
Using getDescendants only 1 part in the group is changing transparency. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried changing between getchildren and getdescendants, no luck
Button 1 and 2 are the same script with different transparencies. Works great, just click the different button to change it back and forth. My problem is it only changes one part within the group “Model8”
local Parts = game.Workspace.Model.Model8:GetDescendants()
for i,v in pairs(Parts) do
function onClicked()
v.Transparency = 1
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)