Hey guys! I’ve just been added to this forum and have recently began adapting my game for Xbox. I’ve grown fond of manually using Guiservice.SelectedObject to easily bind the A button to something, but in many cases (especially when using image buttons) the outline it creates gets very annoying. Is there any way to disable this?
Set GuiObject.SelectionImageObject to another gui object. That gui object will be mirrored on top of the selection object instead of the selection box. You should be able to just set it to an invisible gui to remove the selection box appearance.
There is also a SelectionImageObject property on PlayerGui that will override the default selection for all gui objects, unless you specify a SelectionImageObject for a particular GuiObject (all guiObject SelectionImageObjects override the PlayerGui value if set).
1 Like
It is worth mentioning that if you just want an easy way to make the A button do something you could also use this nifty API:
ContextActionService:BindAction("StartTheGame",
function(actionName, inputState, inputObject)
if inputState == Enum.UserInputState.End then
start()
end
end,
false,
Enum.KeyCode.ButtonA)
You can stop listening using this:
ContextActionService:UnbindAction("StartTheGame")