[Full Release] Input Action System (IAS) & Newly Converted Player Scripts!

here’s the link! Roblox Creator Events

we’re going live today at 11am pacific time :slight_smile:

Is it encouraged to fork the PlayerModule to implement your own features, or should I aim to build these features ontop of existing PlayerModule features?

I’m trying to make mobile and console shiftlock. I would just assign more InputBindings to the shiftlock action, but there is code that only allows shiftlock to be on keyboard and mouse (MouseLockController, line 89, within the UpdateMouseLockAvailability method). This means that every time the method is called when the player isn’t using keyboard and mouse, it will disable the InputAction for shiftlock. My possible solutions to this would be to

  • Listen to the Enabled property of the InputAction using GetPropertyChangedSignal and re-enable it using EnableMouseLock method on the MouseLockController if certain criteria is met.
    • This would lead to issues that if my scripts determine that the shiftlock action is allowed to be disabled (example: DevEnableMouseLock property changing to false), and then the MouseLockController rechecks the availability of shiftlock and decides that it shouldn’t be re-enabled since the player has switched to a gamepad controller (and also DevEnableMouseLock gets re-enabled after this), unless I also listen to the same events that the MouseLockController listens to, I cannot detect that shiftlock should be re-enabled
  • Listen to all the events that MouseLockController listens to.
    • this would just be really annoying to do. and also possible race conditions unless i put task.wait everwhere.
  • Using a script on runtime, replace the UpdateMouseLockAvailability method on the MouseLockController metatable. (unfortunately my current solution)
    • This is objectively the worst option here but also probably the least complicated.
    • This also heavily relies on internal stuff not changing in ways that would break this

If the UpdateMouseLockAvailability method was changed slightly via script edits, I wouldn’t have to do any of these complicated solutions and instead just add the InputBindings via a script during runtime.

So should I just fork the PlayerModule? Do I make a feature request?

Hello, I’d suggest forking the PlayerModule for now so that future changes to the MouseLockController metatable does not break your game. We’re discussing how we can improve the PlayerScripts to support use cases like this as well!

3 Likes

A way to detect double press on an InputAction would be very much appreciated. By the way, I love using Input Action System, it really is a game changer, literally. Keep up the amazing work!

1 Like

Can the rest of the touch actions come to IAS? Currently using IAS and I’m having to use UserInputService for touch actions like TouchRotate, TouchSwipe, etc.

1 Like

Why is it that InputAction states don’t replicate to the server unless AuthorityMode = Automatic?

Hi, InputActions currently should only replicate to the server when AuthorityMode = Server. Can you describe the issue you’re seeing?

any reason why this setup isn’t working? i’m just doing what the documentation told me


the LocalScript prints the InputAction state when StateChanged fires

Hi, could you provide a minimal repro placefile so I can take a look? Thanks!

1 Like

here you go, the input is F
Repro.rbxl (71.2 KB)

Hi, I don’t think LocalScripts run in ReplicatedStorage, can you re-try with a Script instance with RunContext set to Client?

1 Like

thanks, this worked! i guess i wasn’t paying enough attention while reading the documentation, because i thought it just said to use a regular localscript

1 Like

I’m just wishing that they did replicate.

With 300 non-predicted physics assemblies active at once (30 per vehicle @ 10 vehicles), I’m finding that my game runs too poorly to be running with server authority enabled. So, I manually implemented my own rollback and resimulation system for the non-physics objects I was using it for, and now IAS doesn’t work anymore.

1 Like

Anyone having an issue with PreferredBinding not populating?

Hi, thanks for the report! We’re tracking this issue and working on a similar bug, I wanted to know if you had Server Authority enabled in your test place (as this changes around the loading order)? Otherwise would you be able to provide a minimal repro placefile / instructions? Thank you!

Hi, thanks for bringing this up! This is happening because the feature hasn’t been fully released yet. We’re shipping it soon, and it should be fully working shortly :grin:

1 Like

The keys I and O do not work for me to zoom the camera in and out. Tested in a new, blank baseplate in studio, re-binding the keys to different keys like G and H works, but not when binded to I and O. The active studio betas I have enabled are the following: Revamped Asset Manager, Scene Analysis, Segment by Parts and Video Uploads

Edit: Turning on the studio beta New Studio Camera Controls (Updated) fixes this because I assume it uses InputActionSystem.

i want to ask a random question i had about the ias system and server authority (i dont use server authority btw)

is there any other way to get the input data for a player other than to have every inputcontext put into each player instance? cant you add some api that allows you to get the data for a specific player without having to make new instances for every player?

(IAS) InputActionSystem breaks DragDetectors? - Help and Feedback / Scripting Support - Developer Forum | Roblox

I need a little help!

I was able to get a thumbstick vector by requiring the ControlModule inside the PlayerModule, and then using .playerData.moveVector, but you probably shouldn’t rely on this. I’m disappointed that this has only gotten worse when it’s been an issue for a decade.

Edit: There is a slightly better way, access the InputAction object in

StarterPlayer.PlayerModule.InputContext.CharacterContext.MoveAction

and read the Direction2DState property, this seems far less likely to be changed or removed unexpectedly. I still can’t see any actual API for interacting with the mobile thumbstick though, which seems like a huge oversight to me.