I have this cannon. I want it to have a cannon ball fired out of it at different angles once you press F. The F function works and the cannon does move, but I can not find out how to make the right direction. I tried using a BodyThrust to make the ball go forward at a given direction but the ball doesn’t always go straight. Someone told me I should use a body velocity. I would like some help in making this cannon being able to fire in the right direction.

If the front face of the cannon’s shaft is facing the direction you want the ball to go, you can just get it’s LookVector with part.CFrame.LookVector, and then set the ball’s BodyVelocity to the LookVector * studs/sec.
Alright but how do I make it keep going straight?
BodyVelocity should just do that for you once you establish the speed and direction (velocity).
From the wiki: "The BodyVelocity object applies a force on a BasePart such that it will maintain a constant velocity."
So would the script need to edit the Body velocity?
I put part.CFrame.LookVector * 100 Should I make it repeat?
I found out. The script is now
while true do
cannonClone.Velocity = cannonspawn.CFrame.lookVector * 100
wait()
end