Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I order bricks?

Asked by
Zerio920 285 Moderation Voter
10 years ago

Say I have 20 bricks lined up, and I'd want to assign them ascending numbers from one end to the other. (So the first brick would have 1, second brick would have 2, etc.)

I could always manually assign a number value by inserting a numbervalue to each brick and ordering them from 1 to 20, though that would take a bit of time.

Another idea I had was to use

for i,v in pairs (model:GetChildren()) do
local number = Instance.new("NumberValue", game.Workspace)
number.Parent = v
end

But I'm not sure if that would correctly assign the numbers in ascending order from right to left like I need. Any ideas?

0
Why don't people read the "How to post good questions and answers" thing? What have you already tried? https://scriptinghelpers.org/help/how-post-good-questions-answers Perci1 4988 — 10y
0
Sorry, I wasn't aware that page existed. I'll go ahead and revise my question. Zerio920 285 — 10y

Answer this question