How would I go on about "re-binding" the jump action once i unbind it using context action service

So, Im making something, and for it, I need to disable the player’s jump function, so as to prevent them from jumping off a seat.

I used this code to do that:
ContextActionService:UnbindAction("jumpAction")

That has worked perfectly, but now I want to enable the jumpAction once again, but I’m not sure how to.
I suppose I need to use :BindAction() but, I dont exactly know how to.

All help is appreciated!

local UserInputService = game:GetService("UserInputService")
function onJumpRequest()
   if condition then
      --code
   end
end
UserInputService.JumpRequest:Connect(onJumpRequest)
1 Like