Script To Hide 'Open GUI Button' Won't Work Properly?
I am making a game and I made some code for it. For some reason, this VIP gamepass script won't work. Please help!
(this is top localscript)
01 | local mps = game:GetService( "MarketplaceService" ) |
02 | local gamepass = 6549510 |
05 | game.Players.PlayerAdded:connect( function (player) |
07 | if mps:UserOwnsGamePassAsync(player.UserId, gamepass) then |
19 | script.Parent.openClose.Visible = false |
(this is bottom localscript)
01 | local mps = game:GetService( "MarketplaceService" ) |
02 | local gamepass = 6549510 |
03 | pparent = script.Parent.Parent |
07 | game.Players.PlayerAdded:connect( function (player) |
09 | if mps:UserOwnsGamePassAsync(player.UserId, gamepass) then |
18 | if pparent.main.Visible = = false then |
19 | pparent.main.Visible = true |
22 | pparent.main.Visible = false |
27 | parent.MouseButton 1 Down:connect( function () |
These are the files: https://imgur.com/a/YQzgKzi
Basically, this is meant to make it so that if you do not have the VIP gamepass, it stops the gui from showing on the localplayer's screen. For some reason, even though I own the gamepass, it still doesn't show. Please help!