Hi i am trying to make a block that prompts a product purchase when a player touches the part but i keep receiving this error from my code and im not sure what it means?
MarketplaceService:PromptProductPurchase() player should be of type Player
Heres the script i am currently using!
local productId = 86294878 game.Players.PlayerAdded:Connect(function(player) script.Parent.Touched:Connect(function() print("Prompting Purchase!") game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, productId) print("Purchase Prompted!") end) end)
If anyone knows how to help id appreciate it! Thankyou!