Im trying to make a surfaceGUI shop.. and this isnt working... can someone help?
local assetId = 223132588 --Insert any object Id local player = script.Parent.Parent.Parent.Parent while not player:IsA("Player") do player = player.Parent end script.Parent.TextButton.MouseButton1Down:connect(function() game:GetService("MarketplaceService"):PromptPurchase(player, assetId) end)
usually changing this to a script might help... or u might have to define the function on line 6