i dont know if there is a different function you have to use to make a tool for a smartphone. you use GetMouse on the computer but would you use that for the phone as well?
✓ ANSWER ACCEPTED
do i have to use GetMouse if i want to make a tool for a tablet/phone?
1 answer
✓ Accepted answer
You can take advantage of UserInputService - there is an event called InputBegan.
If you check the input returned from the event, and its UserInputType is equivalent to 'Touch', then the player has just tapped on their mobile screen.
local input = game:GetService("UserInputService")
funtion onInput(playerinput,process)
if not process then
if playerinput.UserInputType == Enum.UserInputType.Touch then
print("Player tapped the screen!")
end
end
end
input.InputBegan:Connect(onInput)
This discussion is preserved as it was. New answers, comments, and votes are closed.
