I am trying to unanchor all of the children of a model after 5 seconds. Here's that section of the script..
wait (5) game.Workspace.Obstacle1.Children.Anchored = false
I tried on line 2. But it thought I was looking for a brick named Children. Help?
wait(10) z = game.Workspace.Obstacle1:GetChildren() -- Get's the children wait(2) for i = 1,#z do -- Does on how many Children of Obstacle z[i].Anchored = false -- Un- Anchors All of them wait() end
If this helped +1, if this answered check mark :)
Use a for loop to access all the elements of a model:
wait(5) -- Wait 5 for _,v in pairs(game.Workspace.Obstacle1:getChildren()) do -- :getChildren will return a table of all the children of an object, the for _,v in pairs bit allows us to loop through each value, or object in the table if v.ClassName == "Part" then -- Make sure the current object is a part v.Anchored = false -- If it is a part, un-anchor it end -- End if statement end -- End for loop