Movement Direction Dash Not Working Correctly, Even Though It Should

I have this code that i stole from YBA, and I’m reading through it and I’m trying to understand it. I saw this directional dash code that they use and i tried implementing it, but it’s kind of not working for some reason.

elseif Input == Enum.KeyCode.Q then
				--local iFrame = Instance.new("IntValue"); iFrame.Name = "Dash"; iFrame.Parent = plr.Character
				--game:GetService"Debris":AddItem(iFrame,.6)
			
				local dir = 180

				if Human.MoveDirection.Z < 0 then
					dir = 0
					--repStorage.Remotes.Events.Main:FireClient(plr,"playAnim",{Animation = repStorage.Anims.DashForward,Speed = 1,Phase = 1})
			elseif Human.MoveDirection.Z > 0 then
					--repStorage.Remotes.Events.Main:FireClient(plr,"playAnim",{Animation = repStorage.Anims.DashBack,Speed = 1,Phase = 1})
			elseif Human.MoveDirection.X < 0 then
					dir = 90
					--repStorage.Remotes.Events.Main:FireClient(plr,"playAnim",{Animation = repStorage.Anims.DashLeft,Speed = 1,Phase = 1})
			elseif Human.MoveDirection.X > 0 then
					dir = -90
					--repStorage.Remotes.Events.Main:FireClient(plr,"playAnim",{Animation = repStorage.Anims.DashRight,Speed = 1,Phase = 1})
				else
					--repStorage.Remotes.Events.Main:FireClient(plr,"playAnim",{Animation = repStorage.Anims.DashBack,Speed = 1,Phase = 1})
				end

				local power = 50

				local bV = Instance.new("BodyVelocity")
				bV.Parent = Character.HumanoidRootPart
			
				print(bV.Parent.Parent)
			
				game.Debris:AddItem(bV, 2)

			clientFX:FireClient(Player, "DashBV", {BV = bV, Direction = dir, Power = power, Origin = RootPart})
			end

that last part, clientFX:FireClient()
The code is that is being done in there is this:

function module.DashBV(...)
	local things = ...;
	local origin = things.Origin
	
	local cam = workspace.CurrentCamera
	
	print("hello")
	
	local bV,direction,power = things.BV,things.Direction,things.Power

	local int = 1

	RunService:BindToRenderStep("rotateOrigin",Enum.RenderPriority.Character.Value + 1,function()
		origin.CFrame = CFrame.new(origin.Position,origin.Position + cam.CFrame.LookVector * Vector3.new(1,0,1))
	end)

	RunService:BindToRenderStep("rotateBVDash",Enum.RenderPriority.Character.Value + 3,function()
		bV.Velocity = (origin.CFrame * CFrame.Angles(0,math.rad(direction),0)).LookVector * power * int
	end)
	
	for i=1,24 do
		int *= .97
		bV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
		RunService.RenderStepped:Wait()
		bV.MaxForce = Vector3.new(0,0,0)
	end
	
	bV.MaxForce = Vector3.new(0,0,0)
	bV.Velocity = Vector3.new(0,0,0)
	RunService:UnbindFromRenderStep("rotateOrigin")
	RunService:UnbindFromRenderStep("rotateBVDash")
	bV.Velocity = Vector3.new(0,0,0)
end