Body Velocity or CFrames idk causing gun to shoot in different direction each time I Run the game

The title basically explains the problem im making a auto canon for an aircraft and it kinda works but for some reason the gun keep shooting i different directions each time I play

  • Heres a video of two different Runs.

https://streamable.com/epzxkd
https://streamable.com/mh8wk2

Here the code for it

	local gunpart = PlaneFolder.Plane.Weapons.MachineGun




	local Bullet = rp:WaitForChild("Bullet"):Clone()

	
	Bullet.Anchored = false
	Bullet.Size = Vector3.new(.4, .4, .8)
	Bullet.BrickColor = BrickColor.new("Olivine")
	Bullet.Material = Enum.Material.Neon
	Bullet.Name = "Bullet"
	Bullet.CanCollide = false
	Bullet.CanTouch = true
	Bullet.Transparency = 0
	Bullet.CFrame = gunpart.CFrame
	Bullet.Parent = game.Workspace


	local bv = Instance.new("BodyVelocity", Bullet)
	bv.MaxForce = Vector3.new(5000,5000,5000)
	bv.Velocity = (gunpart.CFrame.LookVector.Unit * 600)
	bv.P = 100

	local floatingForce = Instance.new('BodyForce', Bullet)
	floatingForce.force = Vector3.new(0, 196.2 * Bullet:GetMass() * 0.98, 0)

	Debris:AddItem(Bullet, 7)

Any Help is Very Appeciated

I don’t know much about programming but I would try and change the the code to try and make it so where the mouse goes the gun should shoot. (I’m learning coding so i don’t really know but that is all Ik how to do)

No that wouldnt work it has to be where the gun part is

Like I said idk much about programming I’m trying to learn but I tried lol