Possible to fix script for mobile?

Hey,
I’ve recently had a problem, a gear in my game is not compatible for mobile and i couldn’t seem to fix it.
50% of my game is mobile so this is a pretty huge deal.
unknown
This is the part of the script that i think the problem lies in.
Does annyone know what the issue could be here?

Mobile users don’t have a mouse, so the UserInputType MouseButton1 doesn’t exist. You can use Touch however.

Wouldn’t this cause it to not work for pc players?

Hey, you can use UserInputType's Touch enums or bind a key with ContextActionService Hope this helps!

1 Like

You can allow both types using the or operator to check if it is MouseButton1 or Touch.