#why does it go up 200 and not 100
49 messages · Page 1 of 1 (latest)
@wicked jetty it probably repeats
it does but how do I fix it
destroy it
what
or set a wait
i mean destroy is da samething as fixing
no
I'd say try to add a debounce
local MS = game:GetService("MarketplaceService")
local ID = 827000227
local debounce = false
MS.PromptGamePassPurchaseFinished:Connect(function(plr, id, purchased)
if debounce == false then
debounce = true
if id == ID then
if purchased == true then
game.Players:FindFirstChild(plr.Name).leaderstats.Time.Value += 100
task.wait(1)
debounce = false
end
end
end
end)
Looks like this works ^^ I just tested it and it only prints once
Also I would have no clue as to why it fires 2 times
I tried that
oh
ig I'll test it
it still went up twice
so if I delete the server script and then paste its code in the local script it runs once but it goes back down
local player = game.Players.LocalPlayer
local ID = 827000227--put your game pass id here
script.Parent.MouseButton1Click:Connect(function()
MS:PromptGamePassPurchase(player,ID)
end)
MS.PromptGamePassPurchaseFinished:Once(function(plr, id, purchased)
if id == ID then
if purchased == true then
game.Players:FindFirstChild(plr.Name).leaderstats.Time.Value += 100
end
end
end)```
^^^^^
local script
@devout pendant
@sweet night
hi
so
** You are now Level 21! **
e
e
its been 4 days now
er
rrrrrrrrrrrrrrrrrrrrrrrrrrrerrrrrrrrrrrrrrrrrrerrrrrrrrrrrrrrrrrrrrrr/rrrrrrrrrrrrrrrrrrrrrrrrrrr/rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr/rrrrrrrrrrrrrrrrrrrrrrrrrrrr/rrrrrrrrrrrrrrrrrrrrrrrrrrrrrr/rrrrrrrrrrrrrrrrrrrrrrrrrrrr/