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

How do you make an open-close GUI witch works with robux donation system?

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

9 comments

0

Are you trying to make your Roblox donation GUI open/close?

0

I'm trying to make a button that says "donate" then it will open a menu for amounts of Robux to donate. But, I notice the Robux donation scripted only works alone.

0

So are you trying to make the GUI come down when clicking on the "Donate" button?

0

yes i figured out how to make the open close gui but the roblux script is not working for me

0

Can you post the script please?

0

ok i will post both scripts

0

Ok check my post again i posted it

0

Ok so is the open/close GUI not working or the donation button not working?

0

the donations buttons

1 answer

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!

1 comment

0

So where exactly do I put this?

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