Hello, I have a problem with the script below it works but everytime someone makes a purchase it adds another 50 to the total for example if you bought it once you'd get 50 twice 100 five times 250, can someone please find a problem in this script or message me on roblox to see more but i really need this done
game.Workspace.Board.Main.GoldVendor.x50Gold.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptProductPurchase(Player,179386976) end) -- and then it uses another code request in another script if Info.ProductId == 179386976 then Data.Stats.Gold.Value = Data.Stats.Gold.Value + 50
local button = script.Parent.Purchase local mpService = game:getService("MarketplaceService") button.MouseButton1Click:connect(function() mpService:PromptProductPurchase(game.Players.LocalPlayer, 179386976) end)
You could try starting it with LocalPLayer instead of player.