of     1   

SpaceSquidd
#220083456Friday, June 30, 2017 3:51 AM GMT

Im making a GUI with clothes in it where if you press buy it prompts the purchase but I cant get it to work right, what would this script look like? I have so far Local TopID = CLOTHES ID HERE function onBuy(clkr) game:GetServ("MarketService"):PromPur(TopID, clkr) end ################################# I deleted words out from the code because ROBLOX made a fine filtering system, but everything is complete
TheeDeathCaster
#220083932Friday, June 30, 2017 3:58 AM GMT

1. You require a serverside to use the function. (Not a LocalScript) 2. You didn't give the function an argument by the name of `clkr`, so it's considered a `nil value`. (Meaning it doesn't exist) 3. You don't require an argument for the `MouseButton(left-or-right)(mouse-interact-type)` function; If you wish, you can simply use an anonymous function for this. 4. You didn't set the ################# ################# of `MarketplaceService` service. 5. local player = ... -- Wherever the player is at. bttn.MouseButton(num)(type):Connect(function() MarketplaceService:PromptPurchase(ID, player) end) Please do some research next time man. :/

    of     1