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 » Scripters
Home Search
 

Re: Script won't work

Previous Thread :: Next Thread 
wayne2018 is not online. wayne2018
Joined: 04 Jun 2014
Total Posts: 2509
31 Jan 2016 12:43 AM
It's a server script inside of a text button.

local plr = script.Parent.Parent.Parent.Parent.Parent
local link = game:GetService("MarketplaceService")
deb = 0


script.Parent.MouseButton1Click:connect(function()
local marketId = 31363101 --ID of Dev product
link:PromptProductPurchase(plr,marketId)
link.ProcessReceipt = function(receiptInfo)
if Enum.ProductPurchaseDecision.PurchaseGranted and receiptInfo.PlayerId == plr.userId then
if deb == 0 then
deb = 1
plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value + 500
wait(1)
deb = 0
end
end
end
end)
Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
31 Jan 2016 12:48 AM
I've got a feeling "PromptPurchase" is broken. I tried this the other day, copied and pasted old code of mine which once worked perfectly fine then didn't at all.



#Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217")
Report Abuse
wayne2018 is not online. wayne2018
Joined: 04 Jun 2014
Total Posts: 2509
31 Jan 2016 12:53 AM
This is what the output says:
- MarketplaceService:PromptProductPurchase() player should be of type Player, but is of type Workspace
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
31 Jan 2016 12:53 AM
problem number one: you're doing hacky stuff and manipulating guis from the server
Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
31 Jan 2016 12:55 AM
I'd recommend just using a local script and:
local player = game.Players.LocalPlayer
instead of this:
"local plr = script.Parent.Parent.Parent.Parent.Parent"



#Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217")
Report Abuse
wayne2018 is not online. wayne2018
Joined: 04 Jun 2014
Total Posts: 2509
31 Jan 2016 01:02 AM
Alright, I switched it and it still doesn't work.
Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
31 Jan 2016 01:03 AM
Does it prompt at all?



#Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217")
Report Abuse
wayne2018 is not online. wayne2018
Joined: 04 Jun 2014
Total Posts: 2509
31 Jan 2016 01:04 AM
Nope.
Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
31 Jan 2016 01:05 AM
Like I said before; I swear PromptPurchase is broken.....



#Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217")
Report Abuse
wayne2018 is not online. wayne2018
Joined: 04 Jun 2014
Total Posts: 2509
31 Jan 2016 04:51 PM
Bump
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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