So far example if I put the radius to 5 and put 5 parts it should do something like this:
What the problem is, is that I can’t figure out a way to do this within a script.
Any ideas on how to approach this is greatly appreciated.
Hi, I think, that for this work you should use sin and cos functions. Once, I looked through devforum for learn about sin,cos,tan and i found very similar post to your. I’m not good from math or trigonometry functions, but i still have formula to create circles.
Code:
local Part = game.ServerStorage.Part; -- your part
local num = 5; -- the number of parts, from which you want to create a circle
local radius = 5; -- radius of circle
local startPos = Vector3.new(0,5,0); -- the position you want to create a circle around
for i = 1,num,1 do
local cl = Part:Clone();
cl.Parent = workspace;
local formula = (i * (math.pi*2)/num);
cl.CFrame = CFrame.new(startPos) + Vector3.new(math.sin(formula)*radius,0,math.cos(formula)*radius);
cl.CFrame = CFrame.lookAt(cl.CFrame.Position,Vector3.new(0,startPos.Y,0));
end