How do i launch a player upwards

heres the code

local damage = {}

function damage:damage(receiver, damage, ragdolls, assailant, damagetype)

	if damagetype == nil then
		receiver.Humanoid.Health -= damage
	end
	if ragdolls == "up" then
		
		receiver.HumanoidRootPart.AssemblyLinearVelocity = Vector3.new(0,500,0)
		
	end
	
end
return damage

???

I think it would be better if you can provide a better context of what you are trying to do.

local Damage = {}
Damage.__index = Damage

function Damage:DealDamage(damage, ragdolls, assailant, damagetype)
    if not self:FindFirstChild("HumanoidRootPart") then return end
	if not damagetype then
		self.Humanoid.Health -= damage
	end
	if ragdolls == "up" then
		self.HumanoidRootPart:ApplyImpulse(Vector3.new(0,500,0))
	end
end
return Damage