Hi all, I’m working on some ui animation and I need it to slide out on keypress (which is defined in a js function via classlist.Toggle) but in order to do that I have to SetNuiFocus(true,false) in lua.
The only problem with that is when it’s pressed, I can’t walk, open chat or use my keyboard for just about anything besides the keybind to toggle the animation.
How do I set it so SetNuiFocus(true, false) happens when ‘K’ is pressed to toggle on and then immediately as it is released, SetNuiFocus(false, false) happens so I can go back to walking around with the menu open. The menu is purely visual, it requires no interaction, it just needs to show.