So, I have a brick, that has a surfacgui, that has a textbutton, that has a LocalScript. In the local script I have this code:
local p = game.Players.LocalPlayer
local g = script.Parent
local c = 43875114
g.MouseButton1Down:connect(function()
Game:GetService("MarketplaceService"):PromptProductPurchase(p, c)
end)
What it's supposed to do, is prompt me with a purchase. This is a DevProduct. My friend says there is nothing wrong with the syntax, but it's not working. Any ideas? All help is appreciated!

4 comments
You've asked a simular question here, https://scriptinghelpers.org/questions/37325/why-does-this-devproduct-script-not-work-creating-the-instances-output-does-not-give-any-errors
I know, but that was when I manually made it using a script. I wanted to remove that part, since it didn't work, when your player reset. Isn't there a way to already have the Gui ready? And then just add the script?
Local Scripts don't work in workspace unless they're a member of a character.
Do you mean like on the screen?, yes certainly.