I'm making my building game have mobile functions but whenever I click a gui or mobile button it acts as a UserInputType.Touch and mouse.hit.p. How do I fix this?
InputBegan and other input events pass second parameter which is called "gameProcessedEvent", this is a boolean that is true if you pressed a button or are typing and false if not, you can only execute the code if it's false:
UserInputService.InputBegan:Connect(function(input, gameProcessedEvent) if gameProcessedEvent then return end print("Not typing") end)