1 | local productId = 22933009 |
2 | local player = game.Players.LocalPlayer |
3 |
4 | script.Parent.MouseButton 1 Click:connect( function () |
5 | game:GetService( "MarketplaceService" ):PromptProductPurchase(player, productId) |
6 | end ) |
Did roblox studio break this script?
As said by Stigma, instead of having it as a Local Script, make it a Server-Sided script. To define the player, You'd need to keep adding ".Parent" until you reach the parent of the PlayerGui.