generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: MarketplaceService PromptPurchase help

Previous Thread :: Next Thread 
BloxDaily is not online. BloxDaily
Joined: 08 Feb 2013
Total Posts: 5319
14 Dec 2013 01:41 AM
function click()
id = script.Parent.Parent.Parent.Parent.Item.ID.Value
game.Players.PlayerAdded:connect(function(player)
game:GetService("MarketplaceService"):PromptPurchase(player,id)
end)
end

script.Parent.MouseButton1Down:connect(click)


When i click it does not do anything.
Report Abuse
BloxDaily is not online. BloxDaily
Joined: 08 Feb 2013
Total Posts: 5319
14 Dec 2013 01:55 AM
bump
Report Abuse
BloxDaily is not online. BloxDaily
Joined: 08 Feb 2013
Total Posts: 5319
14 Dec 2013 02:18 AM
bump
Report Abuse
BloxDaily is not online. BloxDaily
Joined: 08 Feb 2013
Total Posts: 5319
14 Dec 2013 08:43 AM
bump
Report Abuse
BloxDaily is not online. BloxDaily
Joined: 08 Feb 2013
Total Posts: 5319
14 Dec 2013 08:49 AM
bump.
Report Abuse
BloxDaily is not online. BloxDaily
Joined: 08 Feb 2013
Total Posts: 5319
14 Dec 2013 08:54 AM
.........
Report Abuse
BloxDaily is not online. BloxDaily
Joined: 08 Feb 2013
Total Posts: 5319
14 Dec 2013 09:01 AM
..
Report Abuse
Estomac is not online. Estomac
Joined: 24 Jul 2013
Total Posts: 1180
14 Dec 2013 09:08 AM
http://wiki.roblox.com/index.php/PromptProductPurchase_(Method)
http://wiki.roblox.com/index.php/MouseButton1Down_(Event)
Report Abuse
Firescrew is not online. Firescrew
Joined: 03 Aug 2012
Total Posts: 1484
14 Dec 2013 09:09 AM
local storething = script.Parent
local ITEM_ID = 114305175

local Click = Instance.new("ClickDetector",storething)

Click.MouseClick:connect(function(p)
game:GetService("MarketplaceService"):PromptPurchase(p,ID)
end)
Report Abuse
Firescrew is not online. Firescrew
Joined: 03 Aug 2012
Total Posts: 1484
14 Dec 2013 09:09 AM
Thats kestrels above so give credit
Report Abuse
BloxDaily is not online. BloxDaily
Joined: 08 Feb 2013
Total Posts: 5319
14 Dec 2013 09:13 AM
So like this?

script.Parent.MouseButton1Down:connect(function(X, Y)
local productId = script.Parent.Parent.Parent.Parent.Item.ID
game.Players.PlayerAdded:connect(function(player)
Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId) -- should pop up a dialog that prompts the player
end)
end)
Report Abuse
BloxDaily is not online. BloxDaily
Joined: 08 Feb 2013
Total Posts: 5319
14 Dec 2013 09:14 AM
@fire

It is GUI not workspace
Report Abuse
Estomac is not online. Estomac
Joined: 24 Jul 2013
Total Posts: 1180
14 Dec 2013 09:28 AM
I reckon this would be easier to understand. I can't test because studio won't launch.

Bond = 007 -- make it simple instead of all those "parents"
player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
game:GetService("MarketplaceService"):PromptPurchase(player,itemID)
end)

-- Ego sum mercator, ego ancillam habet.
Report Abuse
Estomac is not online. Estomac
Joined: 24 Jul 2013
Total Posts: 1180
14 Dec 2013 09:30 AM
line 1 = itemID

I forgot to change it.
That's what I get for changing my mind as often as I do.
Report Abuse
BloxDaily is not online. BloxDaily
Joined: 08 Feb 2013
Total Posts: 5319
14 Dec 2013 09:54 AM
The itemId is an IntValue...
Report Abuse
BloxDaily is not online. BloxDaily
Joined: 08 Feb 2013
Total Posts: 5319
14 Dec 2013 02:29 PM
.
Report Abuse
BloxDaily is not online. BloxDaily
Joined: 08 Feb 2013
Total Posts: 5319
14 Dec 2013 04:05 PM
...
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image