How can I split a part on one axis, the biggest axis

how can I split parts on 1 axis

for example the wall wil be split

but precise and in like four pices idk

with roof is same thing

1 Like

This is in scripting support, so I presume this is about doing it in a script. I am also assuming based off of what you said that you want something to do with cutting a part in half along an axis. Maybe you can do something like:

-- assuming the main part is referenced as "part" in the script and "axis" is a string defining which axis to cut
local pM = {1,1,1} -- multipliers
local p1 = Instance.new("Part")
local p2 = Instance.new("Part") 
if axis == "x" then
 pM[1]= .5
elseif axis == "y" then
 pM[2] = .5
else
 pM[3] = .5
end
local sizeReference = part.Size
p1.Size = Vector3.new(sizeReference.X*pM[1], sizeReference.Y*pM[2], sizeReference.Z*pM[3])
p2.Size = Vector3.new(sizeReference.X*pM[1], sizeReference.Y*pM[2], sizeReference.Z*pM[3])
p1.Position = part.Position
p2.Position = Vector3.new(part.Position.X+(sizeReference.X/2), part.Position.Y+(sizeReference.Y/2), part.Position.Z+(sizeReference.Z/2)
part:Destroy() -- remove if you want to keep the original part too

I invite you to be more specific about your issue if needed.