whenever i test this gamepass is tells me attempt to index nil with a value.like this worked for other things why doesent it work on this.
local id = 10391218
local stats = game.ServerScriptService:WaitForChild("LeaderStats"):FindFirstChild("leaderstats")
local Pmoney = game.ServerScriptService:WaitForChild("LeaderStats"):FindFirstChild("Cash")
local Pmulti = game.ServerScriptService:WaitForChild("LeaderStats"):FindFirstChild("Multi")
local Preb = game.ServerScriptService:WaitForChild("LeaderStats"):FindFirstChild("Rebirths")
game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
if purchased and id == ido then
Pmulti.Value = Pmulti.Value + 1000000 --problem
end
end)
sorry if this is very messy i tried to make it simple but it didn't work or maybe it did.

4 comments
i messed up on the script part
Please put this in a code block
ok yeah sorry i did that but didnt work
There finally it worked in a code block