How i am can fix this?

hello robloxians!,
so i try to make a barriers for game and set all the parts invisible by one script sombody know how to fix that?

that how i put that:


1 Like

You should try this:

local all = script.Parent:GetChildren()

for i, x in pairs(all) do

   x.Transparency = 1

1 Like

:GetChildren() returns an array of children. If you want to change a property for each child you will have to iterate over the array returned and set the property to each child individually.

(Which is why the codeblock @RowanTjeNL1 posted works)


@RowanTjeNL1 thank you so much!. :+1:

1 Like