Hello there, I have been having an issue trying to figure out how to actually create some sort of triangular terrain through terrain generation. I am currently using wedges as the example brick to generate the rows.
Here is the code:
function MakeTriangularTerrain(dummyPart, row, column, parent)
local triangleStartPos = dummyPart.CFrame;
local currentRow = 1;
local currentCol = 1;
for Row = currentRow, row do
wait();
local triangleWedge = dummyPart:Clone();
triangleWedge.Parent = parent;
triangleWedge.BrickColor = BrickColor.new("Really red");
triangleWedge.CanCollide = false;
local rowTriangle = triangleWedge;
local rowSize = rowTriangle.Size;
local currentCFrame = triangleWedge.CFrame;
--rowTriangle.CFrame = currentCFrame;
rowTriangle.Orientation = Vector3.new(0, 90, -90);
if Row%2 == 0 then
rowTriangle.CFrame = currentCFrame * CFrame.new(0, (rowSize.Y * Row)/2, 0);
rowTriangle.BrickColor = BrickColor.new("Bright green");
rowTriangle.Orientation = Vector3.new(0, -90, -90);
end
currentCFrame = rowTriangle.CFrame;
end
end
MakeTriangularTerrain(workspace.TestTriangle, 3, 1, workspace);
Basically, my issue is after spawning the green wedge part it actually does spawn the rotated red one but doesn't move it to the next position, I am currently not seeing how to reset the position and set the new position so it actually does as shown:
Any help to enlighten this a bit more is apreciated!

5 comments
Actually not my first post :O, oh well!
In the CFraming of triangleWedge on the else scope, why did you actually put that "-1.4" ?
Just to get the positioning right. It's manual mathematics, which I DO NOT recommend you use while using CFrame, I would instead try to find some type of algorithm but this worked for me so
Okay, thank you for enligthening me.
Thank you for giving me my first solved question!