So I've had a little problem, there's no error in the output tho, the text isn't changing to it's value, it's supposed to add 1 if bought but whenever i buy it, it's not adding 1 to its value. This is the script, hope some of you can fix it, Change Value:
local MarketplaceService = game:GetService("MarketplaceService") local devproductid = 169303058 MarketplaceService.ProcessReceipt = function(givemeplus) for i, player in ipairs(game.Players:GetChildren()) do if player.userId == givemeplus.PlayerId then if givemeplus.ProductId == devproductid then player.PlayerGui.screen.Spins.Spinvalue.Value = player.PlayerGui.screen.Spins.Spinvalue.Value + 1 player.PlayerGui.screen.Spins.Text = player.PlayerGui.screen.Spins.Spinvalue.Value end end return Enum.ProductPurchaseDecision.PurchaseGranted end end
All I want is to add the value of it and and change the text to the value of it after clicking and buying the button. Button:
spinplus.MouseButton1Down:connect(function(spinplux) game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 167423415) end)
I've fixed it, it's just to put the "player.PlayerGui.screen.Spins.Text = player.PlayerGui.screen.Spins.Spinvalue.Value" at the Button LocalScript. EDITED: It's the Button LocalScript, the number is supposed to be the same as the other script.