Need help with simple part to terrain script

Im trying to turn a part into terrain within a script, I am using a cylinder part and also using :FillCylinder() so that it should work perfectly together, but the terrain generated doesn’t fully fill the cylinder part.
image

workspace.Terrain:FillCylinder(CFrame.new(script.Parent.Position),2,script.Parent.Size.Y/2,Enum.Material.Ground)

I’m not sure what I am doing wrong, it’s not even centered :sob:, this should be like the simplest thing to code, any help would be appreciated!

1 Like

If anybody has a solution feel free to post here, but for now i’ve just gone down the route of “deal with it” and made it just increase the size a little extra than the cylinder part so its good enough

Is the cylinder rotated?
Maybe you slighlty rotated it and so CFrame.new(script.Parent.Position) would not match the rotation?
Also maybe it’s just the terrain precision limitations.

Using part.CFrame causes the terrain to be flipped 90 degrees which is why I did CFrame.new(cylinder.Position) the cylinder is not rotated it’s the default cylinder part just resized