--LocalScript, willing to change to script later because localscript can't handle purchase script
local playerName = game.Players:GetFullName()
if game.Workspace.playerName:FindFirstChild("Humanoid") ~= nil then
game:GetService("MarketplaceService"):PromptProductPurchase(player,382137613)
end
end)
This is my Developer Product short code(not full code). I only used
....MouseButton1Click:Connect(function(player)
game:GetService("MarketplaceService"):PromptProductPurchase(player,382137613)
end
and it said player must be type of Player, but type of is nil so i added GetFullName() and FindFirstChild to get the humanoid, but it won't get the humanoid.

2 comments
Sorry for the cut code. This is the full code: game:GetService("MarketplaceService"):PromptProductPurchase(player,382137613)
Also please tell me the right code to finish purchase. My full code : script.Parent.Coin1000.MouseButton1Click:Connect(function(player) local playerName = game.Players:GetFullName() if game.Workspace.playerName:FindFirstChild("Humanoid") ~= nil then game:GetService("MarketplaceService"):PromptProductPurchase(player,382137613) end end) game:GetService("MarketplaceService").ProcessReceipt