--variables--
local id = 1823654835 -- Paste here your ID.
script.Parent.MouseButton1Click:Connect(function()
print("You clicked!") -- It's just for a test.
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.player,id)
print("Donation succeed") -- It's just for a test.
end)
script.Parent.MouseButton1Click:Connect(function(player)
print("You clicked!") -- It's just for a test.
game:GetService("MarketplaceService"):PromptProductPurchase(player.UserId, -- put ID here)
print("Donation succeed") -- It's just for a test.
end)
I put this script here and it doesn’t work either (productid, I switched to my id) and while I click on this button it won’t even print the commands I pasted.
Well maybe try script.Parent.Parent.Parent.Parent you get the idea, the script is parented to a gui in playergui and the parent of the playergui is the player instance. Although game.Players.LocalPlayer should’ve worked maybe this will change something? There might be more parents to reach the player instance I can’t remember.