How to disable/enable certain movement inputs

  1. What do you want to achieve? Keep it simple and clear!
    I am partaking in a gamejam with the theme being: Limited input, the problem is that I do not know how to disable and then re-enable certain movements.

  2. What is the issue? Include screenshots / videos if possible!

    when There is a W block out in the open like this the player should NOT be able to press “W” and go forward.

    If there is no W block then the player should be able move forward like usual

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I did, but none of them work

Thanks for reading this!

1 Like

uhh is there something for ContextActionService:UnbindAction(“forwardMovement”)
but the other way around? like ContextActionService:BindAction(“forwardMovement”)

if so how would I do that?

Yes. There is a method called BindAction. You can read more about it here

okay, the only problem with this is that it requires a function, something I do not have

Use the documentation to help you write it. It’s super useful in helping you understand what the arguments are and what its purpose is!

I just copied and pasted what the player module had :-/

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.