Bezier curve is different when character is facing different directions

I have a barrage effect that uses bezier curves that seems to be having issues when the character is facing different directions
https://gyazo.com/f0e82dcc8571a5ffb75a10c4c532b416

Here is the code for it

function lerp(a, b, c)
return a + (b - a) * c
end

function quadBezier(t, p0, p1, p2)
local l1 = lerp(p0, p1, t)
local l2 = lerp(p1, p2, t)
local quad = lerp(l1, l2, t)
return quad
end

remote.OnServerEvent:Connect(function(player)
local c = script.Parent.Parent.Parent
local stand = workspace.Thrown:FindFirstChild(“Stand”…player.Name)
local weld = stand.HumanoidRootPart:FindFirstChild(“StandWeld”)
ts:Create(weld, TweenInfo.new(.3, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {C0 = CFrame.new(0,0,-2.7)}):Play()
task.wait(.3)
for i = 1, 50 do
wait()
spawn(function()
local part = game.ReplicatedStorage.VFX.SPArm:Clone()
local leftorright = math.random(1,2)
local p0 = stand.HumanoidRootPart.Position
local p1
if leftorright == 1 then
p1 = stand.HumanoidRootPart.Right.WorldPosition + Vector3.new(math.random(-5,5),math.random(-5,5),0)
else
p1 = stand.HumanoidRootPart.Left.WorldPosition + Vector3.new(math.random(-5,5),math.random(-5,5),0)
end
spawn(function()
task.wait(.1)
part.Transparency = 0
part.Trail.Enabled = true
task.wait(.12)
ts:Create(part,TweenInfo.new(.04),{Transparency = 1}):Play()
task.wait(.04)
part.Trail.Enabled = false
end)

			part.Parent = workspace.Thrown
			local p2 = stand.HumanoidRootPart.End.WorldPosition
			local tweendelay = wait()
			game.Debris:AddItem(part,.5)
			for i = 1, 10 do
				local t = i/10
				local pos = quadBezier(t,p0,p1,p2)
				local direction = quadBezier(t + 0.005, p0,p1,p2)
				ts:Create(part,TweenInfo.new(tweendelay),{CFrame = CFrame.new(pos, direction) * CFrame.Angles(0,math.rad(90),0)}):Play()
				wait()
			end
		end)
end
task.wait(.7)
ts:Create(weld, TweenInfo.new(.3, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {C0 = CFrame.new(-2,0,3)}):Play()

end)