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

For my donation gui i put in the script right but it is not working even though it worked before?

This is the script i put in for the donation gui:

local id = 1077699787

script.Parent.TextButton.MouseButton1Click:connect(function()
    game.MarketplaceService:PromptProductPurchase(script.Parent.Parent.Parent, id)
end)

It was working at one point then it was not. now when i click on the donation gui it does not work

Can someone please help

7 comments

0

Format in code block please.

0

what does that mean sorry im new to this website and scripting

0

are you still online

0

please help

0

It can be because you are using Normal Script. you MUST use a Local Script for these. Insert a Local script and write exactly what is written in the script you wrote.

0

Hi you answered my question and told me to use a local script. I copyed the script deleted it and pasted it on the local script and i played it to test out my donation button and it still did not work any other suggestions?

0

Oh my GOD i found a HUGE problem right now

1 answer

I have the answer to your question. Write down the following in a LocalScript:

local id = 1077699787
local MPS = game:GetService("MarketplaceService") -- The problem were on here for you

script.Parent.TextButton.MouseButton1Click:connect(function()
	MPS:PromptProductPurchase(script.Parent.Parent.Parent, id)
end)

That is the exact answer you need. I hope that helps and be sure to write in the localscript.

1 comment

0

Hi i deleted what i had before and put this and i deleted the green text then i pressed play and it still did not work it is crazy do you thinks its something else and not the script.

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