****What I am trying to do is, when I click on a button then all parts in the "PhoneOn" folder get transparent.
Button = script.Parent
Button.ClickDetector.MouseClick:connect(function()
local Screen = script.Parent.Parent.Screen
for i,v in pairs {Screen} do
if v.Material == Enum.Material.SmoothPlastic then
v.Material = Enum.Material.Neon
else
v.Material = Enum.Material.SmoothPlastic
end
end
--Mostly worrying about the script below.
local PhoneOn = script.Parent.Parent.Parent.PhoneOn --PhoneOn is the name of the folder with parts in it.
for i,v in pairs (PhoneOn:GetChildren()) do
if v:IsA("Part") then
v.Transparency = 1
end
end
end)

1 comment
:GetChildren().Transparency = 1