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?