How do i make a part lean to a vector3

i want to make a part lean to a direction but without changing the place it faces
image
image

3 Likes

maybe set leaning parts CFrame to CFrame:LookAt(leaningparts position, position to lean) and then add rotation if its facing instead of leaning

not ideal if you are trying to make a drone

1 Like

Not sure if you still have this issue, but if you do, can you elaborate? anyway,

you mean like you want it to lean down, but not turn right? if so you can just filter it out by keeping the original rotations except for the coordinate you want it to lean down on, for the Z coordinate, you would just do

local lookat = Vector3

lookat = (at.X, at.Y, lookat.Z)

leaning_part.CFrame = CFrame.lookAt(at, lookat)