Keyboard Menu Help

Hello, hope your having a good day! I am trying to make an entirely keyboard navigation menu screen. For example, S to hover the button that’s below what button your hovering on, and W to do the opposite of that. Enter to select something; like play.

Does anyone know how to do this? I have tried looking on the DevForum, and found nothing, or it just may be that I haven’t been searching far enough.

Thanks! :snowflake:

1 Like

You might find this recent announcement of interest.

Also to make a system like this you will need to use ContextActionService or UserInputService. I would also use the NextSelectionRight, NextSelectionLeft, NextSelectionUp, and NextSelectionDown properties of GuiObjects.

Sorry that this answer is vague. I’m not sure specifically what you’re having trouble with or what you have so far. If you have further problems it would help to explain them.

2 Likes

Yes, so what I have so far is that when the player joins, they are greeted with a menu screen. Currently play is selected and when they press S, the selection box goes to Settings, and then Credits, then when the selection is on Credits, they cannot press S anymore to go down, and they have to press W to go to up again.

Here is what it looks like;

Pressing the \ key for the UI Selection works, but I want it to be automatic and not have the player press , they just spawn with it on.

Try setting the selected object to the Play button when the element is rendered.

GuiService.SelectedObject = playButton
1 Like

How would I make it a custom selection? I want the GUI to appear larger when its selected. Right now it just has this blue box which I don’t really like.

Check out SelectionImageObject

you can set it on an individual item or the whole playergui if you want a custom one for a specific element

2 Likes

What do I need to add to my code to be able to do this?