I’m trying to make all children to a screengui transparent expect the one where the localscript is located in.
This is my current script. But I don’t know how to make it skip it.
script.Parent.MouseButton1Click:Connect(function()
for _, Child in pairs (script.Parent.Parent:GetChildren()) do
if Child:IsA("ImageButton") and not Child == script.Parent then
Child.ImageTransparency = 1
Child.lock.ImageTransparency = 1
Child.text.TextTransparency = 1
end
end
end)
well there are alot of difference ways to check just see what is different from it than the other guis for example the name. You can set it to a name like VisibleGui and just do in the for loop
if Child.Name ~= "VisibleGui" then
--transparent code here
end
Why don’t you make all of the Children transparent, and then make the child with the localscript in it non-transparent?
1 Like
Why do you want to do this?
It might be a better idea to have the button and the hidden stuff be siblings of the same parent so you can just .Visible = false the hidden stuff and not worry about it.