So what I am making is a game called Crumble Runner. My problem is that the bricks won't fall in order, so I need someone to help me. Here is my piece of code:
1 | wait( 3 ) |
2 | for i = 100 , 1 , - 1 do -- This is how many bricks there are (100) |
3 | local pads = script.Parent.Pads:GetChildren() |
4 | local num = math.random( 1 , #pads) |
5 | local unanchor = pads [ num ] |
6 | unanchor.Anchored = false |
7 | wait( 0.8 ) |
8 | end |
1 | for i,v in pairs (script.Parent.Pads:GetChildren()) do |
2 | v.Anchored = false --Might be v or i, forgive me if it's wrong. I haven't scripted in a while. |
3 | wait( 0.8 ) |
4 | end |
That works the table identification into one line, along with the start of the loop and takes up half the lines you tried to.
I'm SquirrelOnToast, and you're welcome.