so i need to calculate size above and below a certain region of a part. if u dont understand heres a pic

i need A size and B size, but the problem is i dont know how to start, i have been brainstorming for like 7 hours and nothing. does anyone know what could i use to calculate that
The CFrame library might have something that could help.
Since you have the tree part and know the location on the part where the axe hit, you can use
(tree part).CFrame:PointToObjectSpace(hit position) to get the position of the hit relative to the tree part’s position. From that you can use the Y offset to calculate the size and position of the two halves.
Example:
local tree = workspace.tree
local axe = workspace.axe
local hit = tree.CFrame:PointToObjectSpace(axe.Position)
local height1 = tree.Size.Y / 2 + hit.Y
local height2 = tree.Size.Y / 2 - hit.Y
local tree1 = tree:Clone()
tree1.Size = Vector3.new(tree.Size.X, height1, tree.Size.Z)
tree1.CFrame = tree.CFrame * CFrame.new(0, hit.Y - height1 / 2, 0)
local tree2 = tree:Clone()
tree2.Size = Vector3.new(tree.Size.X, height2, tree.Size.Z)
tree2.CFrame = tree.CFrame * CFrame.new(0, height2 / 2 + hit.Y, 0)
tree1.BrickColor = BrickColor.Green()
tree1.Parent = workspace
tree2.BrickColor = BrickColor.Red()
tree2.Parent = workspace
tree.Transparency = 1
Before:
After:
This should work regardless of how the “tree” part is oriented, as long as it’s “height” is in the part’s Y-axis.
take the part andthen divide it by two
ok so i thin i understand now divide the part size of whatever the axis of the length is so lets say its y so you multiply the y by a decimal so lets say you want the size of a part thats below 40 percent of the part and above 60 percent so you multiply it by .2 then you use cframe lookvector to make a new part thats has the same cframe of the mother part and then do cframe.lookvector*.4 and that should give you the thing if not just do like 1.4
that sounds promising ima examine what u just said and try to implement that and approve the answer if it works