Long jump in any direction

Hi guys!

  1. What do you want to achieve?
    I need some help with adding long jumps in a specific direction when the player touch a part.

  2. What is the issue?
    I know how to make the player jump high (see attached code) straight up, but how can I make the player jump long to east, west, south or north?

  3. What solutions have you tried so far?
    I have searched up and down for a solution. The closest I got moving in a direction was adding BodyVelocity to the humanoid, but it did not get me anywhere but frustration.

Let us say that the trampoline is at the middle of the map and when the player touch the trampoline I want the player to bounce high to the end of the map either south, west, north or west. Or to a specific spot at the map. Anyone know how I can achieve this?

This is the code for jumping straight up:

local pad = workspace.Trampoline 

	local function jump(hit)
		if hit.Parent:FindFirstChild("Humanoid") then
			local humanoid = hit.Parent:FindFirstChild("Humanoid")
			humanoid.JumpPower = 1000
			humanoid.Jump = true
			wait(.5)
			humanoid.JumpHeight = 500
			task.wait(3)
			humanoid.JumpHeight = 5 --reset JumpHeight after first jump
		end
	end

	pad.Touched:Connect(jump)
1 Like