Hi, I'm trying to make a gui only appear to that player if they own a game pass. Here is the script I tried using, but it didn't work:
local PassId = 11379241
game.Players.PlayerAdded:connect(function(p)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(p.UserId, PassId) then
p.PlayerGui.speed.Frame.Visible = true
end
p.CharacterAdded:Connect(function()
p.PlayerGui:WaitForChild("speed"):WaitForChild("Frame").Visible = true
end)
end)
If you see anything wrong please let me know, thanks.

1 comment
Will write some code for this in a second hold on