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

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

Asked by
Ulysies 50
9 years ago

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

Log in to vote
0
Answered by
Spooce 78
9 years ago

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??

0
StarterGui Ulysies 50 — 9y
0
ScreenGui, and yes. This was placed in starter gui Ulysies 50 — 9y
0
Please direct me to the place this script is contained. Spooce 78 — 9y
0
StarterGui, ScreenGui, script + button. Ulysies 50 — 9y
View all comments (2 more)
0
I meant the actual game. Or just make it a model and message me. I will try to fix. Spooce 78 — 9y
0
Should this not be in a local script inside the player's PlayerGUI? Just a thought. Mystdar 352 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

Is it a localscript?

0
No Ulysies 50 — 9y
0
Maybe it works with one. DevSp4c3 0 — 9y

Answer this question