why won't this work?
local UserInputService = game:GetService("UserInputService")
local lastInput = UserInputService:GetLastInputType()
if UserInputService.GamepadEnabled and not UserInputService.KeyboardEnabled then
script.Parent.Enabled = true
end
and
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Gamepad1 then
if input.KeyCode == Enum.KeyCode.ButtonA then
script.Parent.Parent:Destroy()
end
end
end)
its suppose to check if the player is on xbox and if they are show the gui, and once they press a it destroys it
please help.

3 comments
Are you testing this on a computer using an xbox controller? If so, its probably detecting that both keyboard and gamepad are enabled.
Also if you could show your hierarchy, that would be helpful.
no im not testing it with any controller since i dont have one,