UserInputService:IsMouseButtonPressed for mobile players

The title is self explanatory. When i try to use

uis:IsKeyDown(Enum.UserInputType.Touch)

it makes this error:

And when i try to use

uis:IsMouseButtonPressed(Enum.UserInputType.Touch)

It makes this error:

Is there a function like IsMouseButtonPressed for mobile players/for taps?

I think what you could do is use GetLastInputType and check if it’s equal to the Touch UserInputType. Though not sure how well this’ll work

There are other solutions though those require that we see more code to see where you need to know if a tap was done, if you want to do it as an event, so something happens whenever a touch happens like with InputBegan, you can try to use the TouchTap event

1 Like