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

Marketplace script won't work?

	Load.BuyPack.MouseButton1Click:connect(function() 
		game:GetService("MarketplaceService"):PromptPurchase(player,161883818) 
	end) 

This is supposed to make it so a player clicks the button called BuyPack in the frame Load, and prompts a purchase to buy a model. But it's not working. Please help. PS: THIS IS IN A SURFACE GUI, NOT A REGULAR GUI.

2 comments

0

Are your variables defined?

0

I dont know

1 answer

You got the event Correct... Maybe. But you forgot to declare player

script.Parent.MouseButton1click:connect(function(player) --You forgot the "player" in the brackets...
game:GetService("MarketplaceService"):PromptPurchase(player,id)
end)

Make sure this is in a normal script... You're Welcome :D

1 comment

0

This doesnt work. Fix it please?

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