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.
1 | local shirtId = 897595758 |
2 |
3 | script.Parent.Mousebutton 1 click:connect( function () |
4 | game:GetService( 'MarketplaceService' ):PromptPurchase(player, shirtId) |
5 | 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