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!