I made this script and tested it out using other peoples shirt, t-shirt, pants, etc. to help them out. But every time when I play solo and click on it, it pops up with my script having an error. This is the script and error I have:

local Id = "ASSET NUMBER HERE"

script.Parent.ClickDetector.MouseClick:connect(function(player)
    game:GetService("MarketplaceService"):PromptPurchase(player, Id)
end)

This is the output with error:

14:14:02.565 - Studio API access is not enabled. Enable it by going to the Game Settings page.
14:14:02.568 - Script 'Workspace..Script', Line 6
14:14:02.569 - Stack End

4 comments

2

That's because MarketPlaceService will not work Play solo. Only in Play mode.

0

So, I have to play it solo in order for it to work

1

Yes, if you play like normal the whole script should work. SOLO is not online and so anything to do with online will not work.

0

Thank you