How would i replicate MouseButton1 on Mobile?

Hey there,

I’m wanting to check what device a player is on and then run code based on there input

Script:

input.InputBegan:Connect(function(input,isTyping)
if isTyping then
return
elseif input.UserInputType == Enum.UserInputType.MouseButton1

What would be the best way to create a similar action for Mobile?

Thanks,

I think it’s just UserInputType.Touch or TouchTap, something along those lines.

3 Likes

Hey would you have any idea how i would write that? im having trouble i tried using Elseif but that isnt rlly working out?

On InputBegan are you checking if it’s .TouchTap?

Not really sure at all what im supposed to be writing i just copied the MouseButton1 line and Replaced it with Touch and im getting Syntax errors…