Mousebutton keys no longer working ingame.

For some reason since about 2 days ago any mousekeybind refuses to work in my game.

In studio they still work but only ingame they dont work.

Game affected: Plane Crazy | Play on Roblox

1 Like

Hi, thanks for the report, can you provide us a minimal repro file?

3 Likes

Hi there!
I cant get a repro because this happens ingame only.

To reproduce it:

  1. Join plane crazy
  2. Finish the tutorial
  3. Click the purple controller icon beside the settings and join PVP mode
  4. Load the plane save file from the bottom right blue icon
  5. Spawn in using the green plane icon on the bottom
  6. Press left mouse button and no yellow lines will show up ingame


This is what the yellow lines look like.

Hi, can you provide more context about how you are implementing your keybind system? Are you using UIS, CAS, or IAS? Without any code it is difficult for us to diagnose the problem.

I can repro the issue though and can confirm that this is not the result of any flag flip in the past week. Is it possible that it is related to any code or updates you have made?

1 Like

Im using inputbegan and it seems to be printing KeyCode.None when pressing any of the mousekeys for some reason

In studio its inputObject.KeyCode.Unknown instead of inputObject.KeyCode.None which is why its unable to properly detect mousekeys ingame.

1 Like

Hi,

Thanks for getting back to me! We recently aliased Enum.KeyCode.Unknown to Enum.KeyCode.None but the old usage of Unknown should still work to reference None as an old name. Can you describe how you are encountering the issue and provide a repro file (maybe you are doing direct string comparison instead of referencing the enum values)?

The newest Studio version should also have this update. If you are using UserInputService.InputBegan, I suggest comparing directly to the InputObject.UserInputType rather than the InputObject.KeyCode property to get the mouse button hardware changes.

2 Likes

I use userinputtype for this already but relied on detecting Unknown to determine whether it should be userinputtype or a keycode

local Input = inputObject.KeyCode.Name
if Input == "Unknown" then
	Input = inputObject.UserInputType.Name
end

local KeyInput = Keys[Input]
if KeyInput ~= nil then
1 Like

Hello,

Thanks for getting back to me! Unfortunately we aren’t able to support direct string comparison of enum values with renaming KeyCode.Unknown to KeyCode.None, I suggest comparing enum values when possible to minimize the chances of breaking compatibility.

As a result, I will close this post as “can’t fix” for now, and I sincerely apologize for the issue that this caused. Please let me know if you encounter any additional issues!

2 Likes