Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Buttons is not a valid member of ScreenGui "Players.Player2.PlayerGui.VIPShop"?

Asked by 1 year ago

for i,v in pairs(script.Parent.Buttons:GetChildren()) do if v:isA("TextButton") then v.MouseButton1Click:connect(function() pcall(function() if v:FindFirstChild("Pass") then game.MarketplaceService:PromptPurchase(game.Players.LocalPlayer,tonumber(v.Name)) else
game.MarketplaceService:PromptProductPurchase(game.Players.LocalPlayer,tonumber(v.Name)) end end) end) end end

1 answer

Log in to vote
0
Answered by 1 year ago
Ad

Answer this question