Why Is this piece of Code not Disabling My GUI if you own a gamepass?
I have been trying for a few days to make this and it has just not been working I think my code is fine but I need some help
03 | game:GetService( "MarketplaceService" ).PromptGamePassPurchaseFinished:Connect( function (plr,ido,purchased) |
04 | if purchased and ido = = id then |
05 | script.Parent.Parent.ScreenGui.Visible = false |
08 | game.Players.PlayerAdded:Connect( function (plr) |
09 | plr.CharacterAdded:Connect( function (char) |
10 | if game:GetService( "MarketplaceService" ):UserOwnsGamePassAsync(game.Players [ char.Name ] .UserId, id) then |
11 | script.Parent.Parent.ScreenGui.Visible = false |
I don't see whats wrong can someone please help me?