Hi! I'm trying to make a way so when a player owns a gamepass, a frame appears when they join the game. It's so far not working.
This code is in a local script. The script's parent is a frame.
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync (game.Players.LocalPlayer, 11318343) == true then script.Parent.Visible = true end
the 1st and 2nd lines of code is in one line. When I put them in one line here, it just cut off.
You need to put a userid, not a player instance.
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync (game.Players.LocalPlayer.UserId, 11318343) == true then script.Parent.Visible = true end
Hope this helps!