So I have a currency shop that give you money. And it will let you buy the developer product but doesn't give the money.
The local script on the button --
MPS = game:GetService("MarketplaceService")
id = 1037851428
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
MPS:PromptProductPurchase(player, id)
end)
Script in ServerScriptService --
local MPS = game:GetService("MarketplaceService")
MPS.ProcessReceipt = function(receiptInfo)
if receiptInfo.ProductId == 1037851428 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.leaderstats.Money.Value = player.leaderstats.Money.Value + 250
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
please help me :(

2 comments
You would need a remote event since LocalScripts don't change value objects nor do they replicate for other players in the server.
A remote event is a instance event you can fire to give information from the client to the server or you can send information from the server to a client. If you need more information, here is a link to the wiki page about remote event. (https://developer.roblox.com/en-us/api-reference/class/RemoteEvent)