That's the error that pops up when I put this script. Any ideas as to why it's not working? It's in the StarterPack talking to the StarterGui.
Player = game.Players.GetChildren -- "Player" is the games Players children. local productId = 19191511 playerr = game.Players.LocalPlayer playerr.PlayerGui.Shop.A.MouseButton1Click:connect(function() Game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, productId) end)
Player = game.Players:GetPlayers() -- "Player" is the games Players children. local productId = 19191511 playerr = game.Players.LocalPlayer playerr:WaitForChild("PlayerGui").Shop.A.MouseButton1Click:connect(function() Game:GetService("MarketplaceService"):PromptProductPurchase(playerr, productId) end)
Presumably, the code was running before the PlayerGui loaded.