I want to know what’s the best WAY of detecting a player is on Xbox “or” Mobile. I read some forum posts but this was my answer, I could use some feedback for this.
(i am still not very good at cross platform scripting)
local UserInputService = game:GetService("UserInputService") local lastInput = UserInputService:GetLastInputType() if UserInputService.GamepadEnabled or UserInputService.TouchEnabled and not UserInputService.KeyboardEnabled then if (lastInput == Enum.UserInputType.Gamepad1) then -- do whatever balghehgesdhhrhkkoleeshb end end
Why am I trying to get Mobile and Xbox?
You see I have a skill tree system that uses the “Move” function which is basically just hover mouse. And I doubt such things can exist on mobile or xbox so I wanted to do click on the icon and the info shows up and click it again and it goes away. I could use some help and feedback etcc