Alright so I made a Key Pressing Script using UserInputService.
local UIS = game:GetService('UserInputService')
local player = game.Players.LocalPlayer
local shop = script.Parent.Parent:WaitForChild('PlayerGui').ShopGui
UIS.InputBegan:connect(function(InputObject)
if InputObject.KeyCode == Enum.KeyCode.X then
shop.Background.Visible = true
print('X was pressed')
end
end)

1 comment
Why does this make it work? Is it because he was looking for the shop before it was loaded?