hello, I have a server script that makes a brick blue when the game started, and I have 100 bricks, how do I make it so that I don’t need to do the script 100 times?
Use a For
loop to do it for how many times you want
for i = 1, 100 do
--Brick spawning code
end
Edit: Didn’t really read the post correctly woops, thought you wanted to spawn a brick 100 times haha, I think @NinjaFurfante07’s solution should work for what you wnat
2 Likes
You should use the for loop, example: put all the bricks in a folder and use this script:
for i, v in pairs(game.Workspace.NameOfTheFolder:GetChildren()) do
--do what you need here
end
1 Like