Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

This discussion is preserved as it was. New answers, comments, and votes are closed.