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: My gamepass dialog shop does not work...

Previous Thread :: Next Thread 
Builder123ABC is not online. Builder123ABC
Joined: 13 Feb 2010
Total Posts: 1050
23 Aug 2013 03:41 PM
I haven't added the various IDs.

local KatanaId =
local SkID =
local daID =
local heID =
local ffID

script.Parent.ClickDetector.MouseClick:connect(function(player)
Game:GetService("MarketplaceService"):PromptPurchase(player, PantsId)
end)

local dialog = script.Parent
dialog.DialogChoiceSelected:connect(function(player, choice)

if choice == script.Parent.DialogChoice.ChoiceA then
script.Parent.ClickDetector.MouseClick:connect(function(player)
Game:GetService("MarketplaceService"):PromptPurchase(player, KatanaId)
end)
elseif choice == dialog.DialogChoice.ChoiceB then
script.Parent.ClickDetector.MouseClick:connect(function(player)
Game:GetService("MarketplaceService"):PromptPurchase(player, SkId)
end)
elseif choice == dialog.DialogChoice.ChoiceC then
script.Parent.ClickDetector.MouseClick:connect(function(player)
Game:GetService("MarketplaceService"):PromptPurchase(player, daId)
end)
elseif choice == dialog.DialogChoice.ChoiceD then
script.Parent.ClickDetector.MouseClick:connect(function(player)
Game:GetService("MarketplaceService"):PromptPurchase(player, heId)
end)
elseif choice == dialog.DialogChoice.ChoiceE then
script.Parent.ClickDetector.MouseClick:connect(function(player)
Game:GetService("MarketplaceService"):PromptPurchase(player, ffId)
end)
end
end)
Report Abuse
Builder123ABC is not online. Builder123ABC
Joined: 13 Feb 2010
Total Posts: 1050
23 Aug 2013 05:56 PM
b1
Report Abuse
SecantFuture is not online. SecantFuture
Joined: 21 Aug 2013
Total Posts: 63
23 Aug 2013 05:58 PM
This method is very inefficient.

And your doing it wrong.
Report Abuse
Geomaster is not online. Geomaster
Joined: 05 Jul 2008
Total Posts: 1480
23 Aug 2013 06:02 PM
*you're

Also, I'm not very sure how MarketService works but the coding probably lies with the dialogue rather than the shop itself
Report Abuse
Builder123ABC is not online. Builder123ABC
Joined: 13 Feb 2010
Total Posts: 1050
23 Aug 2013 08:14 PM
@Secant, could you offer some advice/help instead of useless critism. I know I am doing it wrong because it does not work. :/

-RTM Commander
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
23 Aug 2013 08:16 PM
Perhaps it doesn't work because you don't have the ID's?

Simply leaving blank equal signs will break your script.
Report Abuse
Builder123ABC is not online. Builder123ABC
Joined: 13 Feb 2010
Total Posts: 1050
23 Aug 2013 09:02 PM
That might be it. Any other suggestions?

-RTM Commander
Report Abuse
seth101 is not online. seth101
Joined: 06 Nov 2007
Total Posts: 554
23 Aug 2013 09:11 PM
I think he means it's inefficient as in you need more variables rather than typing script.Parent.Parent.Child.Part etc.
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
23 Aug 2013 09:32 PM
"local KatanaId =
local SkID =
local daID =
local heID =
local ffID"

If that's an actual part of your script it wont work, you can have blank equals signs. Just set them to some random value.
Just a tip for the future, if you have errors like that you should see red underlines somewhere in your script, hovering your mouse over them will show you the problem.
Report Abuse
emporerj is not online. emporerj
Joined: 23 Nov 2010
Total Posts: 39351
23 Aug 2013 09:38 PM
I don't think that Game is a thing, I think it' only game.

But you did more than that wrong.

Twitter @emporerjrblx | ctrl + shift + n solves everything - The Dragon of RT
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