Help with Jump Script (2)

Hello, I have been trying to make a script where when the player jumps the player will do an ollie on their skateboard. However, nothing happens. I figured out that the function doesn’t go off when the player jumps. The script worked in a different place which is weird. Thank you for your help!

function jumpRequest()

	if JumpEnabled and math.abs(Board.Velocity.Y) < 5 then

		JumpEnabled = false
		SetAnimation("Stop", {Animation = GetAnimation("BoardKick")})
		SetAnimation("Stop", {Animation = GetAnimation("LeftTurn"), FadeTime = 0.5})
		SetAnimation("Stop", {Animation = GetAnimation("RightTurn"), FadeTime = 0.5})
		SetAnimation("Play", {Animation = GetAnimation("Ollie"), FadeTime = 0, Weight = 1, Speed = 4})
		Board.StickyWheels = false
		Board:ApplySpecificImpulse(Vector3.new(0, 45, 0))
		OllieThrust.force = Vector3.new(0, 45, 0)
		DidAction("Jump")
		delay(0.1, function()
			if OllieThrust then
				OllieThrust.force = Vector3.new(0, 0, 0)
			end
		end)
	else
		Board.StickyWheels = true
	end
end
UserInputService.jumpRequest:Connect(jumpRequest)

Thank you!

I don’t know if jumpRequest is a deprecated function of UIS, but it says in the API reference that JumpRequest needs to be typed with a capital J.

1 Like

looks like u forgot to capitilize the j in Jumprequest
image

theres also alternitives to detectign a jumping for example in my jump cooldown script i used humanoidstatechanged

local humanoid = script.Parent.Humanoid
local userinputservice = game:GetService("UserInputService")

humanoid.StateChanged:Connect(function(old,new)
	if new == Enum.HumanoidStateType.Jumping then -- detected jumping 
		humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
		wait(1)
		humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)
	end
end)
1 Like

Thank you so much for the help !!