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

This Gui should work, but it doesnt...?

Im trying to make a Gui that you can click on and you can buy something. This is the script inside a ScreenGui with a TextButton. The script is...

local assetId = 27112438 --Insert any object Id

script.Parent.TextButton.MouseButton1Down:connect(function(player) --If true connect the function player
Game:GetService("MarketplaceService"):PromptPurchase(player, assetId)
end)

2 answers

Have you actually made the ScreenGui or SurfaceGui and inserted a script with the code above, and a TextButton? Is it placed in the StarterGui or Workspace??

6 comments

0

StarterGui

0

ScreenGui, and yes. This was placed in starter gui

0

Please direct me to the place this script is contained.

0

StarterGui, ScreenGui, script + button.

0

I meant the actual game. Or just make it a model and message me. I will try to fix.

0

Should this not be in a local script inside the player's PlayerGUI? Just a thought.

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