# Math help for my rock effect

Im creating a rock smash effect (and please note that I know how to do this, i just have a very confusing error that no one seems to be able to fix). Here is my current code, or a chunk of it β

local function getEquation(r, a, x,y)
local x,y = r*math.sin(a) ,r*math.cos(a)
return {x,y}
end
local function createCircle(originPart, partSpacing, radius, partParent)

for count = 0,360,partSpacing do

local pa = Instance.new("Part", partParent)
pa.Anchored, pa.CanCollide = true, false

local x,z = tbl[1], tbl[2]
local px,py,pz = p.CFrame.X,p.CFrame.Y,p.CFrame.Z

pa.CFrame = CFrame.new(px+x, py, pz+z)
transformation(pa, partParent, originPart)

end

end

This seems to work normally, but if I fire the function with, say, partSpacing=72 and radius=15 then it would look like this β https://cdn.discordapp.com/attachments/813561151769542696/996941672652996740/unknown.png

if anyone could help, I would really appreciate it!

The primary issue I see is that the for loop operates with an integer number of degrees while the math library trig functions use radians. A quick fix would be