You can either use the equation for a circle, or sine and cosine.
Since ROBLOX is already in radians, we can easily use the sine and cosine functions. Sine and Cosine are defined as Y/r and X/r respectively. With this information, we can find Y and X easily with basic algebra to this:
X = r*cos(T)
Y = r*sin(T)
When T is in radians.
With that said, we can make a loop to create a circle.
local Radius = 5
local Y_Coord = 4
for i = 1, 360, 2 do
local p = Instance.new("Part",workspace)
p.Anchored = true
p.Size = Vector3.new(1,1,1)
p.CFrame = CFrame.new(Vector3.new(Radius*math.cos(math.rad(i)), Y_Coord, Radius*math.sin(math.rad(i))), Vector3.new(0,Y_Coord,0))
wait()
end
|