I am creating a Rocket Launcher, however as seen in the image below, the rocket is rotated 90 degrees of how it should really be. It’s always 90 degrees wrong no matter what direction you are looking.
I am not very good with CFrames, so help would be appreciated.
Here’s a visual representation of what you’re experiencing (Cylinder starts from red part and faces the blue part):
The highlight shows you the Front face of the cylinder. That is why it’s always rotated 90 degrees regardless of which direction you fire from. If you wanted to have it rotated correctly, you could just do this:
--lookAt is equivalent to CFrame.new(pos1, pos2)
Rocket:PivotTo(CFrame.lookAt(RocketHole.Position,MousePos) * CFrame.Angles(0, math.rad(90), 0))