Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to detect if a player is on a IOs device? [nobody?]

My game is primarily used for Windows, and has a great functionality on the device. However majority of ROBLOX clients use IOs.

I have a lot of scripts where i use UserInputService, and other things that dont work on IOs. Is there a certain type of service or way to detect if the player is on Ipad or Iphone?

I have used ContextActionService but that crashed my game even more.

If you exclaim: "This is not a request site", then I'm not buying it. I would be glad for any response if the following.

5 comments

0

You cannot, also, iOS*. The only alternative way is to configure UserInputService and or ContextActionService to support mobile input, otherwise, remove mobile device access to your game.

0

You can ask if they are on Android or Ios (if u trust them) at the start at the game...That what i can think

0

Thanks for you're responses!

0

@Nguyenlegiahung ~ Bright idea! you are always full of ideas. Thanks.

0

No problem :D

1 answer

✓ Accepted answer

I can do all (VR, Phone (both iOS and Android), PC/Mac, and Console).

local UserInputService = game:GetService("UserInputService")

if UserInputService.TouchEnabled then
	--code here (Android, iOS)
elseif UserInputService.KeyboardEnabled then
	--code here (PC/Mac)
elseif UserInputService.VREnabled then
	--code here (VR Headset)
elseif UserInputService.GamepadEnabled then
	--code here (Xbox)
end

I know you specifically said iOS but this is all I got for that.

2 comments

0

Keep in mind that there exists laptops with touch screens.

0

But don't they have keyboards?

This discussion is preserved as it was. New answers, comments, and votes are closed.