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
 

Developer Product that boosts a leaderstat?

Previous Thread :: Next Thread 
johny220 is not online. johny220
Joined: 30 Oct 2011
Total Posts: 4584
12 Apr 2014 06:41 PM
Sorry, but I'm totally lost on how to do this.
Report Abuse
TheRobloxian909 is not online. TheRobloxian909
Joined: 08 Aug 2013
Total Posts: 2444
13 Apr 2014 01:25 AM



local MarketplaceService = Game:GetService("MarketplaceService")
local buyButton = way to the button or block that gets you the bost
local productId = id

buyButton.MouseButton1Click:connect(function(player)
MarketplaceService:PromptProductPurchase(player, productId)
--boost here
end)
Report Abuse
johny220 is not online. johny220
Joined: 30 Oct 2011
Total Posts: 4584
13 Apr 2014 10:29 AM
local MarketplaceService = Game:GetService("MarketplaceService")
local buyButton = way to the button or block that gets you the bost
local productId = id

buyButton.MouseButton1Click:connect(function(player)
MarketplaceService:PromptProductPurchase(player, productId)
--boost here (So right there, I would put the function, like "local.game.players.leaderstats.Money.Value + 500?)
end)
I can almost guruntee that's wrong, but again, im a complete noob

Report Abuse
COOLDUDE11OO is not online. COOLDUDE11OO
Joined: 21 Aug 2011
Total Posts: 5115
13 Apr 2014 10:37 AM
script.Parent.Parent.Parent.leaderstats = script.Parent.Parent.Parent.leaderstats + 500
Report Abuse
johny220 is not online. johny220
Joined: 30 Oct 2011
Total Posts: 4584
13 Apr 2014 11:47 AM
script.Parent.Parent.Parent.leaderstats = script.Parent.Parent.Parent.leaderstats + 500

You don't specify which leaderstat, though. I have 3.
Report Abuse
COOLDUDE11OO is not online. COOLDUDE11OO
Joined: 21 Aug 2011
Total Posts: 5115
13 Apr 2014 01:08 PM
I would have figured you would do that part.
Report Abuse
johny220 is not online. johny220
Joined: 30 Oct 2011
Total Posts: 4584
14 Apr 2014 05:05 PM
what, script.Parent.Parent.Parent.leaderstats = script.Parent.Parent.Parent.leaderstats.Money.Value + 500?
Report Abuse
IAmTheRolo is online. IAmTheRolo
Joined: 12 Nov 2013
Total Posts: 859
14 Apr 2014 05:34 PM
script.Parent.Parent.Parent.leaderstats.Money.Value = script.Parent.Parent.Parent.leaderstats.Money.Value + 500
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