Problem : Hello, I am having trouble applying an action when a player makes a donation. An IntValue is called Donator and is located in the player but I can’t manage to interact with this script. I tried plr.Donator.Value = 1
But it does not work. I also tried to make a FireClient but it does not work either to interact with the value in a local script but it doesn’t work either. Thanks
mps.ProcessReceipt = function(Player)
print("Here i tried : Player.Donator.Value = 1")
print("I also tried : Game.ReplicatedStorage.DonationOK:FireClient(Player)")
local amount = mps:GetProductInfo(Player.ProductId, Enum.InfoType.Product).PriceInRobux
local success, err = pcall(function()
local totalDonated = ods:GetAsync(Player.PlayerId) or 0
ods:SetAsync(Player.PlayerId, totalDonated + amount)
end)
return success and Enum.ProductPurchaseDecision.PurchaseGranted or Enum.ProductPurchaseDecision.NotProcessedYet
end