Gamepass not working

Could you post the code to the frame script?
Also,
To my understanding right now, you are attempting to press E to show the GUI, and press E again to hide it. Am I correct?

If you make the GUI visible by using a serverscript (which I don’t recommend) and invisible with a localscript, the server will still think the frame is visible. Meaning that the serverscript is making the frame visible while it already is visible while the client sees the frame as invisible

No i press E for make fram visible and when i close the frame and i re-press E for remake frame visible it’s not work

Thank you i have solved my problem with this info :slight_smile:

1 Like

local plr = game.Players.LocalPlayer
local id = 8535327
local MarketplaceService = game:GetService(“MarketplaceService”)

local HasGamepass = false
if MarketplaceService:UserOwnsGamePassAsync(plr.UserId,id) then
– Player has the gamepass, setting variable.
HasGamepass = true
end

– Handling the E keypress
local frame = script.Parent.Frame – change this variable

game:GetService(“UserInputService”).InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.E then
– Checking to see if the frame is visible or not
if frame.Visible == false then
frame.Visible = true
end
end
end)