You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I am trying to make a baseplate get generated out of parts (Size is for example 4,6,4)
-
What is the issue? Include screenshots / videos if possible!
Well, uhh. I am trying to make a baseplate get generated out of parts right…?
Right. But it generates a cross instead??
I remember seeing a tutorial on how to make what I want, but i think I lost it.
Here is the code
local Origin = Vector3.new(0,0,0)
local AmountParts = 30
local spawned = 0
local function addPart(pos)
local part = Instance.new('Part', workspace)
part.Size = Vector3.new(4,6,4)
part.Anchored = true
part.Position = pos
spawned += 1
return part
end
for x = 0, AmountParts/4, 1 do
for z = 0, AmountParts/4,1 do
task.spawn(function()
addPart(Origin + Vector3.new(4 * x, 0, 0))
end)
task.spawn(function()
addPart(Origin + Vector3.new(-4 * x, 0, 0))
end)
task.spawn(function()
addPart(Origin + Vector3.new(0, 0, 4 * z))
end)
task.spawn(function()
addPart(Origin + Vector3.new(0, 0, -4 * z))
end)
print(spawned)
end
end