Hi! I've been trying for a long time to merge my open close GUI with my Roblox donation GUI. Can some one help me? here are my scripts.
script for my open close gui
local MainFrame = script.Parent local CloseDonations = MainFrame:WaitForChild("CloseDonations") local OpenDonations = MainFrame.Parent:WaitForChild("OpenDonations") OpenDonations.MouseButton1Click:connect(function() MainFrame.Visible = true end) CloseDonations.MouseButton1Click:connect(function() OpenDonations.Visible = true MainFrame.Visible = false end) --script for my open close gui
script for my robux donation buttons
local id = 360542490 script.Parent.Donate10.MouseButton1Click:Connect(function() game.MarketplaceService:PromptProductPurchase(script.Parent.Parent.Parent, id) end) --script for one of my donation buttons
Found your problem! Was it easy to fix Here's the code
local id = 360542490 -- the id of the devproduct script.Parent.MouseButton1Click:Connect(function() --I had every local script in the button game.MarketplaceService:PromptProductPurchase(game.Players.LocalPlayer, id) --you had "Script.Parent.Parent.Parent" when it should be "game.Players.LocalPlayer" end)
Hope it helpd!