on line 2, is there a better way to get the parent's move stat? i dont want to have to type a function for each number (4,5,6,7,8, etc.)
also is there a way to project selection boxes from line 4 according to the move stat ?
like a move stat of 3 would be 3 bricks in each direction, 4 would be 4 in each direction, etc.
(if it's math, i suck at math)
for i, v in pairs(game.Workspace.Map:GetChildren()) do
if script.Parent.Move.Value == 3 then
if v.Name == "TerrainB" then
Instance.new("SelectionBox", v)
if script.Parent.Move.Value == 4 then
if v.Name == "TerrainB" then
Instance.new("SelectionBox", v)
if script.Parent.Move.Value == 5 then
if v.Name == "TerrainB" then
Instance.new("SelectionBox", v)
end
end
end
end
end
end
end

1 comment
Tab your code correctly.