-
What do you want to achieve? Pressing the console button to focus GUI
-
What is the issue? My game has always active menu GUI. In the image, right down one is it. When ButtonSelect is pressed, it focuses on that GUI. But I don’t know how to do it exactly.
-
What solutions have you thought of so far? ProximityPrompt is gray when adding from “+ thing” at the right of GUI.
You’ll have to script console input for this, by using ContextActionService.
local keyCode = Enum.KeyCode.ButtonX --This is the button that focuses on the menu
--Change this variable to another button if you'd like
local contextActionService = game:GetService("ContextActionService")
contextActionService:BindAction("FocusMenu", function(actionName, inputState)
if inputState == Enum.UserInputState.Begin then
--Add code to focus on the menu here
end
end, false, keyCode)
This must be a LocalScript, preferably in the menu UI.
1 Like
I didn’t know there was a way to focus within code, but now I found it!
Still I don’t have one, but I know where most of console buttons are.