Help with grab BodyGyro needed

You can write your topic however you want, but you need to answer these questions:
I have a grab system but the rotation of the grabbed object has been broken for months,
I’ve tried many different ways i could’ve thought about but none of them worked.
https://gyazo.com/ed816aa5863ea1ebeff691d56df126cd

The rotation part of the script:

local p = CFrame.new(game.Players.LocalPlayer.Character.Head.CFrame.p,mouse.Hit.p)*CFrame.new(0,0,-5)
lastMouseHit.NR_grabPos.grabBodPos.Position = p.p
lastMouseHit.NR_grabPos.grabBodGyr.CFrame = p

What do you mean by grab system, like if you were to click and drag an option to pick it up? Are there any errors in the output?

By the grab system i mean pressing E on a item, so it starts floating in the direction of the mouse (Like the burger aboard pickup).
There are no errors in the output. Im only trying to find a fix for the rotation calculations.

What’s broken? Looks to be working alright to me.

When i grab something, the rotation instead of being the same goes to the right/left direction in around 90 degrees.

It’s possible mouse.Hit is hitting the grabbed item, try using lookAt from the character instead, or add the grabbed part to the mouse ignore/filter

I just tried and it still happens.

nevermind, i found a solution myself