script.Parent.Parent.ClickDetector.MouseClick:Connect(function(Player)
game:GetService("MarketplaceService"):PromptGamePassPurchase(Player, 11261938)
end)
It does nothing, and returns nothing in the output section. How do I fix this?
script.Parent.Parent.ClickDetector.MouseClick:Connect(function(Player)
game:GetService("MarketplaceService"):PromptGamePassPurchase(Player, 11261938)
end)
It does nothing, and returns nothing in the output section. How do I fix this?
Is this is a local or server script. For market place service, you need to use a local script to prompt the game pass purchase (I think).
This script should work. The first parameter used in the ClickDetector.MouseClick
event is the player who clicked it, therefore prompting the purchase to the player who clicked it should work properly. I have tested this exact script in my own game and it worked as expected.
Here’s a few things to help you find what’s wrong:
It’s a local script. I tried testing if the surface gui over it was bothering the click but it wasn’t.
The gamepass ID is correct, and it is referring to the click detector. And third party purchases are enabled
Ah, it’s because you’ve got this in a LocalScript then. Test the exact same code in a normal script and it should work.
Got it. Thank you, if it doesn’t work make sure to stay tuned.
It does not do anything, still no error.
Nevermind! It was just lag, TYSM!!