How to block certain stuff for mobile users?

I want some stuff for mobile users, like idk but I would like to know

1 Like

Check if their client is mobile. Then just don’t create the things you don’t want them to have.

UserInputService.TouchEnabled is true when someone is on any touchscreen device. Might be best to make sure to check if they have no keyboard in the case that a person’s laptop has touchscreen abilities. (UserInputService.KeyboardEnabled)

local UserInputService = game:GetService("UserInputService")

if (not (UserInputService.TouchEnabled and UserInputService.KeyboardEnabled)) then
--// do something else because they are mobile
else 
--// they are not mobile so do the original thing
end

But does it mean for me (my laptop is touchscreen) will it affect people like with touchscreen on their pc/laptop? edit: nvm)

i dont know for sure but i think if it tells you have a keyboard it will do normal pc eevn if you have touchscreen on pc i dont really know much about touchscreen pc since im a mac person but i assume that is what would happen

I think that it disables it:

UserInputService.KeyboardEnabled

I think that stops it. It has if not UserInputService.KeyboardEnabled then

I think it will only count mobile users.