So I know you can do like
local part = workspace:FindFirstChild("ooga") if script.Parent.Position.Y >= part.Position.Y then -- Do whatever end
but what if the part was tilted on the Z axis 90 degrees, how would you be able to tell if the part is above or below it? (Local to the part)
To find where a part is positioned relative to another part you can use their CFrames to find an offset. This offset is the relative position and rotation between those two objects, so if you were to translate A by the offset between A and B, you'd get B. It's a bit hard to understand at first but once you start using it more it starts making more sense.
The CFrame object already has a function to find this offset; ToObjectSpace().
Here's an example of how it can be used, and how it can solve your problem.
local c0 = workspace.Part0.CFrame local c1 = workspace.Part1.CFrame local offset = c0:ToObjectSpace(c1) print(offset.Position.Y) -- This will print the relative Y coordinate between the parts, which can be used to find whether or not a part is below or above another part.