Hello I've written this script
1 | script.Parent.MouseButton 1 Click:Connect( function () |
2 | local Children = script.Parent.Parent:GetChildren() |
3 | Children.Visible = false |
4 | end ) |
but it doesn't make the children visible false?
You want to iterate through with a for loop
1 | script.Parent.MouseButton 1 Click:Connect( function () |
2 | local model = script.Parent.Parent:GetChildren() |
3 | for i,v in pairs (model) do |
4 | v.Visible = false |
5 | end |
6 | end ) |
Thank you AlbertoMiAmigo,
I've fixed it though just by listing the children
1 | script.Parent.MouseButton 1 Click:Connect( function () |
2 | local Children = script.Parent.Parent.Content and script.Parent.Parent.MoreContent |
3 | Children.Visible = false |
4 | end ) |