--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.
game.Players:GetFullName() will return ”game.Players”. If you're using a LocalScript, you can use player = game.Players.LocalPlayer. With RemoteEvents, they return the player as the first argument.
This is the code for a LocalScript, which won't work for you reasons you said, but it should help you.
local player = game.Players.LocalPlayer ....MouseButton1Click:Connect(function() game:GetService("MarketplaceService"):PromptProductPurchase(player, 382137613) end)
I don't remember how to process developer products, but the wiki gives you everything you need, even code you can copy and edit.