ApplyImpulse upwards?

I have a piece of code that uses :ApplyImpulse to the HumanoidRootPart but I only have it for going forward right now. I was wondering how I could edit this script so it can boost the character upwards like a jump and how would i make it go left, right, back for strafing.

    local char = plr.Character
	local root = char and char:FindFirstChild("HumanoidRootPart")
	
	--
	
	if root then
		local magnitude = mag
		local direction = root.CFrame.LookVector
		local mass = root.AssemblyMass
		
		root:ApplyImpulse(direction*magnitude*mass)
		
	end

Thanks!

Use linear velocity and How do you use linear velocity

Here are all directions, enjoy! :slightly_smiling_face:

Root:ApplyImpulse((Root.CFrame.UpVector * 100) * Root.AssemblyMass) -- Up
Root:ApplyImpulse((-Root.CFrame.UpVector * 100) * Root.AssemblyMass) -- Down

Root:ApplyImpulse((Root.CFrame.LookVector * 100) * Root.AssemblyMass) -- Front
Root:ApplyImpulse((-Root.CFrame.LookVector * 100) * Root.AssemblyMass) -- Back

Root:ApplyImpulse((Root.CFrame.RightVector * 100) * Root.AssemblyMass) -- Right
Root:ApplyImpulse((-Root.CFrame.RightVector * 100) * Root.AssemblyMass) -- Left