Hi, so I'm making a GUI where if a player clicks it, it will ask them if they want to buy a shirt. Here is the script I already have.
local shirtId = 897595758 script.Parent.Mousebutton1click:connect(function() game:GetService('MarketplaceService'):PromptPurchase(player, shirtId) end)
I'm not sure what's wrong, but the (player is underlined in red so that's an error. Does anyone know what I'm missing? Any help is appreciated, thank you!
so i think its underlined because the script has no idea what your talking about because you havent stated it in a function earlier. To fix this, just put player in the parenthesis in the function then the script can know what u mean