How can I make a throwable object stick to another object at a specific angle?

Hello, like the title suggests, I am making a part that when thrown, makes the object stick at an angle from the wall or part. To go more in depth I am trying to make a sticky bomb that when thrown to a wall, floor, etc. It will land on only its back. It should look like this.

But the problem that is occuring is it gets welded in a more weird sense and looks like this:

The code for it to land look likes this;

--"hit" is a parameter for the .Touched Event.

local lookAt = C4.CFrame:PointToWorldSpace(hit.CFrame.Position)
local up = hit.CFrame.UpVector
local d = lookAt:Cross(up)

local offset = C4.Position - hit.Position
local heading = math.atan2(-offset.Y, offset.Z)

C4.CFrame = C4.CFrame * CFrame.lookAt(offset, heading * lookAt) -- This did work for a little while but it soon broke?
1 Like

Try to cast a ray to the wall and it will return a normal, pretty sure after that you will just need to do heading * lookAt + Normal and it should ‘stick’ to the wall

How could I make it orientate the way I intent it too?