GuiObject Documentation
Classes inheriting from GuiObject have InputBegan, InputChanged, and InputEnded. I was really hoping to use these for a SurfaceGui, but found that they do not appear to work on mobile.
Here is a repo. Please test using mobile, thank you. Testing with Desktop will produce expected behavior (a Message with Text property set to “success”).
If it means anything, I am testing with an iPhone 5C.
ImageButton.InputBegan:connect(function(inputObject)
local inputType = inputObject.UserInputType.Name
if inputType == "Touch" or inputType == "MouseButton1" then -- mobile support with a conditional
end
end)