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

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

Asked by
Potaaden -18
6 years ago
Edited 6 years ago

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
0
Are you trying to make your Roblox donation GUI open/close? fr2013 88 — 6y
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. Potaaden -18 — 6y
0
So are you trying to make the GUI come down when clicking on the "Donate" button? fr2013 88 — 6y
0
yes i figured out how to make the open close gui but the roblux script is not working for me Potaaden -18 — 6y
View all comments (5 more)
0
Can you post the script please? fr2013 88 — 6y
0
ok i will post both scripts Potaaden -18 — 6y
0
Ok check my post again i posted it Potaaden -18 — 6y
0
Ok so is the open/close GUI not working or the donation button not working? fr2013 88 — 6y
0
the donations buttons Potaaden -18 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

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!

0
So where exactly do I put this? Potaaden -18 — 5y
Ad

Answer this question