SurfaceGui Navigation

I want to make a surfacegui that you can navigate with your arrow keys, however I can’t figure out a way to focus on the gui like screengui’s do so that I can accept player keyboard input. Using nextselectionup and nextselectiondown doesn’t seem to work for surfacegui’s.

1 Like

Is the SurfaceGui’s parent set to StarterGui or is it directly parented to a part?

Client inputs (button clicks/hovers, TextBox selection, etc.) are only registered if the SurfaceGui’s parent property is set to StarterGui and the Adornee property is set to the part you want it to render on.

I’ve tried parenting it to both the part and startergui with no success

1 Like

Upon further investigation, this might be bugged for SurfaceGuis. According to this post, it’s bugged for Xbox, but I’m not sure about keyboard.

If parented to the StarterGui you need to set its Adornee property to the target part in a script. Otherwise it will reset once the game loads. Then you can take user input within the SurfaceGui.

For more user input functionality you may also want to take a look at SurfaceGui | Documentation - Roblox Creator Hub in case you need to find pixel coordinates from relative stud coordinates on the surface gui.

you can use user input service with .Magnitude. Check is the player is near and then if they press the arrow key or not.