Bullet spread not working while firing?

If I fire while moving my character in a straight line and aiming at the same spot, the bullet spread basically does nothing at all and im not sure why?

DEMONSTRATION:

f369aedd2737d0df535269558255ddfd32d1ab8d_2_690x392

RAYCASTING CODE:

local function fire()
	local mouseLocation = UserInputService:GetMouseLocation()
	local viewportRay = currentCamera:ViewportPointToRay(mouseLocation.X, mouseLocation.Y)
	local viewportRaycast = workspace:Raycast(viewportRay.Origin, viewportRay.Direction * travelDistance, raycastParameters)
	local viewportIntersection = viewportRaycast and viewportRaycast.Position or viewportRay.Origin + viewportRay.Direction * travelDistance
	local muzzlePosition = muzzleAttachment.WorldPosition
	local bulletDirection = generateRandomCone((viewportIntersection - muzzlePosition).Unit, math.rad(bulletSpread)) * tool:GetAttribute("BulletTravelDistance")
	local bulletRaycast = Workspace:Raycast(muzzlePosition, bulletDirection, raycastParameters)
	local bulletRaycastResult = bulletRaycast and bulletRaycast.Instance
	local bulletIntersection = bulletRaycast and bulletRaycast.Position or viewportIntersection
	local distanceBulletTraveled = (muzzlePosition - bulletIntersection).Magnitudee
end

i have a bullet spread function in this module

local RNG = Random.new()
local TAU = math.pi * 2

module.randomDirection = function(direction : Vector3, minAngle: number, maxAngle: number): Vector3
	
	local directionalCF = CFrame.new(Vector3.new(), direction)
	return (directionalCF * CFrame.fromOrientation(0, 0, RNG:NextNumber(0, TAU)) * CFrame.fromOrientation(math.rad(RNG:NextNumber(minAngle, maxAngle)), 0, 0)).LookVector
	
end