|
wait(0.5)
local player = script.Parent.Parent.Parent.Parent.Parent
local tool = game.Lighting:findFirstChild("Burger")
local productId = 20580787
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
end)
local a = tool:clone()
a.Parent = player.Backpack
|
|
|
Changed it to this:
wait(0.5)
local pla = script.Parent.Parent.Parent.Parent.Parent
local tool = game.Lighting:findFirstChild("Burger")
local productId = 20580787
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
local a = tool:clone()
a.Parent = pla.Backpack
end)
--------------
Still doesn't work.... |
|
|
|
The problem is, nothing happens, no output. |
|
|
--ya no wat caps matter
wait(0.5)
local pla = game.Players.LocalPlayer
local tool = game.Lighting:FindFirstChild("Burger")
local productId = 20580787
script.Parent.MouseButton1Click:connect(function()
g=Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
end)
if g.PurchaseAccept==true then
local a = tool:clone()
a.Parent = player.Backpack
end
--this might work but if it doesnt pm me |
|
|
--oops
wait(0.5)
local pla = game.Players.LocalPlayer
local tool = game.Lighting:FindFirstChild("Burger")
local productId = 20580787
script.Parent.MouseButton1Click:connect(function()
g=Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
while true do
if g.PurchaseAccept==true then
local a = tool:clone()
a.Parent = player.Backpack
g.PurchaseAccept=false
end
wait()
end
end)
--this might work but if it doesnt pm me
|
|
|
wait(0.5)
local player = game.Players.LocalPlayer
local tool = game.Lighting:FindFirstChild("Burger")
local productId = 20580787
script.Parent.MouseButton1Click:connect(function()
while true do
local g = Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
wait()
if g.PurchaseAccept == true then
local a = tool:clone()
a.Parent = player.Backpack
else
print"nope"
end
wait()
end
end)
¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬
The above seems to work, but it doesn't give me the burger... |
|
HuntHelloJoin Date: 2011-01-19 Post Count: 577 |
does it print nope right after the gui pops up? |
|
|
--oops
wait(0.5)
local pla = game.Players.LocalPlayer
local tool = game.Lighting:FindFirstChild("Burger")
local productId = 20580787
script.Parent.MouseButton1Click:connect(function()
g=Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
repeat until g.ProductPurchaseDecision=='PurchaseGranted'
local a = tool:clone()
a.Parent = player.Backpack
end)
--this might work but if it doesnt pm me
|
|
|
You always leave out line 2 with the 'pla' error and I fix it up, but no that still doesn't work as it should... |
|
HuntHelloJoin Date: 2011-01-19 Post Count: 577 |
what errors does it give?
|
|
|
Players.cokePanda.PlayerGui.Picnic.Frame ImageButtontocalS:8: attempt to index global 'g' (a nil value) |
|
|
or
03:36:48 - Disconnected event because of exception
03:36:52 - doAcceptPurchase success from ypcall is true reason is nil
if I swap some things around |
|
|
|
|
|