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: Developer Product help

Previous Thread :: Next Thread 
Fjfod is not online. Fjfod
Joined: 05 Aug 2013
Total Posts: 81
05 Mar 2014 02:46 PM
Hi, this is TexasTech717's alt. So, looks like all you dudes in the gold hat were right. So, I made a script that goes under the Starter GUI button to buy a product and when you are finished, it gives you plus 500 points. However, it stopped working at the plus 100 points part. Could you please help me if I gave you the script in the first place?

local buyButton = script.Parent
local productId = 19217668
local mps = game:GetService"MarketplaceService"
local player = script.Parent.Parent.Parent.Parent.Parent

function getPlayerById(id)
for i,v in pairs(game.Players:GetPlayers()) do
if v.userId == id then
return v
end
end
end

buyButton.MouseButton1Click:connect(function()
mps:PromptProductPurchase(game.Players.LocalPlayer, productId)
end)

mps.ProcessReceipt = function(info)
local plr = getPlayerById(info.PlayerId)
local money = player.leaderstats.Points
money.Value = money.Value + 500
end

Thanks!
Report Abuse
TexasTech717 is not online. TexasTech717
Joined: 24 Apr 2012
Total Posts: 1129
05 Mar 2014 02:47 PM
I approve that this was posted by my alt.
Report Abuse
Amexurous is not online. Amexurous
Joined: 28 Jan 2014
Total Posts: 324
05 Mar 2014 02:48 PM
k
Report Abuse
TexasTech717 is not online. TexasTech717
Joined: 24 Apr 2012
Total Posts: 1129
05 Mar 2014 02:49 PM
So can anyone help?
Report Abuse
TexasTech717 is not online. TexasTech717
Joined: 24 Apr 2012
Total Posts: 1129
05 Mar 2014 03:08 PM
bump 1
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
05 Mar 2014 03:11 PM
There is no Plus 100 points part...
Report Abuse
TexasTech717 is not online. TexasTech717
Joined: 24 Apr 2012
Total Posts: 1129
05 Mar 2014 03:15 PM
i meant 500
Report Abuse
TexasTech717 is not online. TexasTech717
Joined: 24 Apr 2012
Total Posts: 1129
06 Mar 2014 11:28 AM
Bump 2
Report Abuse
TexasTech717 is not online. TexasTech717
Joined: 24 Apr 2012
Total Posts: 1129
06 Mar 2014 12:14 PM
Bump 4 I think
Report Abuse
TexasTech717 is not online. TexasTech717
Joined: 24 Apr 2012
Total Posts: 1129
06 Mar 2014 12:24 PM
No now is bump 4
Report Abuse
TexasTech717 is not online. TexasTech717
Joined: 24 Apr 2012
Total Posts: 1129
07 Mar 2014 07:50 PM
Bump
Report Abuse
HILLBILLYY is not online. HILLBILLYY
Joined: 08 May 2010
Total Posts: 764
07 Mar 2014 07:54 PM
Can you post the output?
local buyButton = script.Parent
local productId = 19217668
local mps = game:GetService"MarketplaceService"
local player = script.Parent.Parent.Parent.Parent.Parent

function getPlayerById(id)
for i,v in pairs(game.Players:GetPlayers()) do
if v.userId == id then
return v
end
end
end

buyButton.MouseButton1Click:connect(function()
mps:PromptProductPurchase(game.Players.LocalPlayer, productId)
end)

mps.ProcessReceipt = function(info)
local plr = getPlayerById(info.PlayerId)
if player:FindFirstChild("leaderstats") ~= nil then
local money = player.leaderstats.Points
money.Value = money.Value + 500
end
end



Maybe your leaderstats script is capitalized?
Report Abuse
TexasTech717 is not online. TexasTech717
Joined: 24 Apr 2012
Total Posts: 1129
07 Mar 2014 07:54 PM
It is. Would that make a difference?
Report Abuse
TexasTech717 is not online. TexasTech717
Joined: 24 Apr 2012
Total Posts: 1129
07 Mar 2014 07:59 PM
output isn't saying something wrong...
Report Abuse
TexasTech717 is not online. TexasTech717
Joined: 24 Apr 2012
Total Posts: 1129
07 Mar 2014 08:47 PM
Bump 6
Report Abuse
Raiden120204 is not online. Raiden120204
Joined: 12 Aug 2008
Total Posts: 118
07 Mar 2014 08:54 PM
Shouldn't the mps variable be mps=game:GetService("MarketplaceService")?
Report Abuse
TexasTech717 is not online. TexasTech717
Joined: 24 Apr 2012
Total Posts: 1129
08 Mar 2014 06:21 AM
I'll try it.
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