Trying to do a script that when you click a button all the parts in the model "doors" become Transparent and CanCollide off, I dont want to have it so that every single individual part is listed in the script if possible, this is what i've thought will work but it dosent, any ideas?
function onClicked()
game.Workspace.Door:GetChildren().Transparency = 1
game.Workspace.Door:GetChildren().CanCollide = false
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

1 comment
GetChildren is a table of everything so use a for loop to go through all the children and set transparency and collision 1 at a time.