My bullet is going in the wrong direction

I am working in one gun it works but the bullet goes wrong I dont know why. Because when I was making the bullet on Workspace it was really good.

script.Parent.Shoot.OnServerEvent:Connect(function(player,LookAt)
	local Gun = player.Backpack:FindFirstChild("MLG Sniper") or player.Character:FindFirstChild("MLG Sniper")
	local cframe = Gun.BulletLocation.CFrame
	local bullet = game.ReplicatedStorage.Bullet:Clone()
	bullet.Parent = script.Parent
	bullet.CFrame = cframe -- I think the problem is here
	bullet.Velocity = LookAt*300
	local fly = Instance.new("BodyForce",bullet)
	fly.Force = Vector3.new(0, bullet:GetMass()*game.Workspace.Gravity, 0)
	wait()
	bullet.Touched:Connect(function()
		wait(0.25)
		bullet:remove()
	end)
end)

Gif:

1 Like

In the gun is a part called BulletLocation right?
Try rotating the part to see if anything gets fixed.

1 Like

You can rotate the Bullet with CFrame.Angles().

1 Like

I tried but doesnt work :frowning:

You mean in bullet.CFrame = … ?

Yes, bullet.CFrame = bullet.CFrame * CFrame.Angles().

1 Like

Nvm I just changed the Orientation.

Also, I recommend to use :Destroy(), :Remove() is deprecated.

I got one script inside the bullet when touch something.