How do I spawn a part at a specific location around another part

So say I have a circle and an angle. How can I get a location X studs out from the circle at a certain angle
EDIT: Forgot to mention that the second part needs to be facing the same direction as the angle outwards from the center part and the center part has a 1:1 size
Poorly made diagram:

2 Likes

if it’s 3D, the easiest thing you can do to make part first rotate then multiply it’s look vector and rotate, it will create nice circle

That’s what I’m trying to figure out
Also it’s on a 2D plane

1 Like

Ok you know, i can’t test it now, but i think you should experiment with loops, you see, when your index is changing you can add it to circle objects position and whoola!

I think you’re confused. I just need to get the location + rotation facing away from the initial circle

Solved, just had to ask Bing

local angle = math.rad(90) -- convert your angle to radians
local distance = 2 -- your distance X
local circleCenter = Vector3.new(0, 0, 0) -- replace with the center of your circle

-- calculate position on circle
local positionOnCircle = Vector3.new(
    math.sin(angle) * distance,
    0,
    math.cos(angle) * distance
)

-- add the position where you want to center the circle
local partPosition = circleCenter + positionOnCircle
1 Like

ok, sorry for confusing, on 2D it’s hard to do

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.