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

If i had a "press e to open door", for example, how would i get it tp work on ipads, phones, ect?

I am trying to make a game, but realized it has a lot of "Press e's". If a person was on a phone, would it be possible for them to type e? Or do i have to add a line of code that does the same thing, except with mouse click1?

Thanks for any help!!!

2 comments

0

Im not a great scripter but i think you could add a specific pickup gui only for mobile and when they are close to something they can press it and pick it up like that.

0

Learn about ContextActionService, UserInputService etc, before going in to advanced practises. Your question also falls into the category as Not - Constructive, because we can only help with code or anything related to RobloxLua! If you don't post questions related to lua, then your question will/may not be answered correctly. If you'd like you could visit this help page to construct a good questi

1 answer

The user input service has events propper for touchpad devices like TouchStarted, TouchEnded, TouchMoved, TouchTap, TouchTapInWorld, TouchLongPress, TouchPan, TouchPinch, TouchRotate and TouchSwipe.

For the keyboard, you can change the KeyCodes for custom created buttons. There is how to create buttons in screen that are also specific for phones and tablet.

Alternativelly you can allow players on phone to touch a BillboardGui in the screen to open it. Or touch in the door. It is possible to know if a player is using a touch enabled device so you can enable\disable this way of interaction.

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