Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What's wrong with this dev. product?

The walkspeed, I bought it and it didn't work how could I fix it?

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


script.Parent.MouseButton1Click:connect(function()
local marketId = 21255472
link:PromptProductPurchase(plr,marketId)
link.ProcessReceipt = function(receiptInfo)
if Enum.ProductPurchaseDecision.PurchaseGranted and receiptInfo.PlayerId == plr.userId then
if deb == 0 then
deb = 1
local Playerwalkspeed = 30 --This is what's wrong
wait(1)
deb = 0
end
end
end
end)

1 answer

✓ Accepted answer

Here you go! I changed line 1 & 13

If it works, please select my answer as the correct answer. Thanks!

local plr = game.Players.LocalPlayer
local link = game:GetService("MarketplaceService")
deb = 0


script.Parent.MouseButton1Click:connect(function()
local marketId = 21255472
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.Character.Humanoid.WalkSpeed = 30
wait(1)
deb = 0
end
end
end
end)

1 comment

0

Thanks but, it isn't working, when you click on the GUi button it won't show the market place buying thing.

This discussion is preserved as it was. New answers, comments, and votes are closed.