so this is the script
local player
script.Parent.MouseButton1Click:Connect(function()
local MarketplaceService = game:GetService("MarketplaceService")
local productID = 993976756
player = script.Parent.Parent.Parent.Parent.Parent.Name
print(player)
MarketplaceService:PromptProductPurchase(player,productID)
end)
when i run it, it says, unable to cast value to object it happens at the
MarketplaceService:PromptProductPurchase(player,productID)

1 comment
Try removing the .Name at the end of player.