I'm generating parts evenly around the perimeter of a cylinder, which I do with this.
local function GenerateParts(Amount)
local Theta = math.pi * 2 / Amount
for i = 1,Amount do
local Angle = Theta * i
local X = Radius * math.cos(Angle)
local Y = Radius * math.sin(Angle)
local Z = Base.Position.Z
local newPart = PartTemplate:Clone()
PartTemplate.Parent = Base.Parent
PartTemplate.CFrame = CFrame.new(X,Y,Z) * CFrame.Angles(0,math.pi/2,0)
end
end
Where I'm stuck is generating the parts so each would be rotated with one corner facing the cylinder's Z, and one facing outward. It's probably less complicated than I'm making it, but does anyone have a solution for this?
