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

Why doesn't this frame become visible when player is on xbox?

Here's my code.

if game:GetService("UserInputService").GamepadEnabled then
	game.StarterGui.MainGui.XboxFrame.Visible = true
end

1 answer

✓ Accepted answer

###You do not get the frame from StarterGui. You get it from PlayerGui.

if game:GetService("UserInputService").GamepadEnabled then
    
    local pgui = game:GetService("Players").LocalPlayer.PlayerGui
    pgui.MainGui.XboxFrame.Visible = true
end

2 comments

0

use game.Players just easier no diffrent i don't think than what you did

0

No, game.Players is prone to script failure, should the Players service be renamed..

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