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: Roblox broke it!

Previous Thread :: Next Thread 
SimplyRemove is not online. SimplyRemove
Joined: 24 Nov 2012
Total Posts: 4387
27 Oct 2014 11:51 AM
Roblox broke a script I have in a GUI for buying credits.. anyone know what they did and how to fix it?

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


script.Parent.MouseButton1Click:connect(function()
local marketId = 21256239
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.Credits.Value = plr.leaderstats.Credits.Value + 20
wait(1)
deb = 0
end
end
end
end)
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
27 Oct 2014 12:01 PM
I'm pretty sure you have to prompt product purchases on the client side...

Roblox didn't break it. It probably never worked.
Report Abuse
HyroadCoder is not online. HyroadCoder
Joined: 15 Jul 2014
Total Posts: 813
27 Oct 2014 12:42 PM
I'm loling to this message.
Report Abuse
SimplyRemove is not online. SimplyRemove
Joined: 24 Nov 2012
Total Posts: 4387
27 Oct 2014 02:33 PM
It always worked before, but then around the time of the new particle effects I tested it and it didn't work.
Report Abuse
SimplyRemove is not online. SimplyRemove
Joined: 24 Nov 2012
Total Posts: 4387
28 Oct 2014 05:41 PM
Bump
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
28 Oct 2014 05:48 PM
If theres no output put prints in the script and tell us what line the script stops at
Report Abuse
SimplyRemove is not online. SimplyRemove
Joined: 24 Nov 2012
Total Posts: 4387
10 Nov 2014 11:32 AM
Bump!
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
10 Nov 2014 11:42 AM
Give us output.
Report Abuse
SimplyRemove is not online. SimplyRemove
Joined: 24 Nov 2012
Total Posts: 4387
11 Nov 2014 01:31 AM
This is the output when I try to click it:

07:28:56.411 - MarketplaceService:PromptProductPurchase() player should be of type Player, but is of type Players
07:28:56.412 - Script 'Players.Player.PlayerGui.Extra.50 Credits.Script', Line 8
07:28:56.413 - Stack End
07:28:56.413 - Disconnected event because of exception

and this is the line that Roblox lua debugger is saying is wrong:

link:PromptProductPurchase(plr,marketId)
Report Abuse
SimplyRemove is not online. SimplyRemove
Joined: 24 Nov 2012
Total Posts: 4387
11 Nov 2014 05:08 PM
Bump
Report Abuse
IcyFires is not online. IcyFires
Joined: 29 Jun 2013
Total Posts: 5046
11 Nov 2014 05:09 PM
local plr = script.Parent.Parent.Parent.Parent
local link = game:GetService("MarketplaceService")
deb = 0


script.Parent.MouseButton1Click:connect(function()
local marketId = 21256239
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.Credits.Value = plr.leaderstats.Credits.Value + 20
wait(1)
deb = 0
end
end
end
end)
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
11 Nov 2014 05:11 PM
Of course they broke it. Roblox breaks everything. :D
Report Abuse
SimplyRemove is not online. SimplyRemove
Joined: 24 Nov 2012
Total Posts: 4387
13 Nov 2014 10:51 AM
@Icy that made the button not work even more.
Report Abuse
HyroadCoder is not online. HyroadCoder
Joined: 15 Jul 2014
Total Posts: 813
13 Nov 2014 10:52 AM
Icy, in my opinion, is a huge troll. (And on special occasions, points out what methods need to be deprecated :D)
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
13 Nov 2014 11:31 AM
"is a huge troll"
Have you met anaiyze?
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
13 Nov 2014 12:00 PM
He rarely posts tho
Report Abuse
anaIyze is not online. anaIyze
Joined: 29 May 2014
Total Posts: 2048
13 Nov 2014 12:31 PM
kohl = (game . Players . LocalPlayer )

link = Game : FindService [[ MarketplaceService ]]

Kohl_enable_disable = 0

KohlItem = ("21256239")

script . Parent . mouseButton1Down : connect ( function ( )
link : PromptProductPurchase (.true && KohlItem);
kohl. leaderstats. Credits. Value = ( kohl. leaderstats. Credits. Value + 20);
end )


-- Profeshinal scripture :).



Report Abuse
HyroadCoder is not online. HyroadCoder
Joined: 15 Jul 2014
Total Posts: 813
13 Nov 2014 12:51 PM
Orlly? Sensei?
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
13 Nov 2014 01:07 PM
Server sided scripts don't run in GuiInstances with filteringenabled, screenguis are omitted from the server, this might also be the case without filteringenabled, but I don't think so.
Maybe this is the cause? Hook remotes to it. I didn't read the script, so be wary of other potential mistakes.

-=Robo=-
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