I want this script to work on TextButton where you click the button instead of using a part with ClickDetector. Can you please change it to TextButton that can work? This is the same script I asked before but with TextButton to it:
local Id = "ASSET NUMBER HERE"
script.Parent.TextButton.MouseClick:connect(function(player) --Changed ClickDetector to TextButton
game:GetService("MarketplaceService"):PromptPurchase(player, Id)
end)

7 comments
I was kinda mad how you accepted the other guy's answer instead of mine because I gave a thorough explanation so you actually LEARN how to script instead of relying on Free Models or the website or asking other people for answers. Also, use MouseButtonDown1Click instead of MouseClick when you are using text or Image buttons in Gui's because ClickDetectors have different events. Imma little inraged
I meant to accept the other guys answer, but not this one. I am glad you are explaining them to me. TheAlphaStigma you helped me alot to
No problem, that's what we're here for. :)
TheAlphaStigma. I haven't got a reply from you when I PM'ed you on your alternate account.
AlphaStigma is either cloning himself or is always on scripting helpers when I'm on... Creepy! Jk he is good at scripting and helped me too.
TheAlphaStigma is just an account for Scripting Helpers, because at the time my Main, TheeDeathCaster, had a max of 5-10 groups, so I created TheAlphaStigma for that purpose. :P
TheAlphaStigma please answer my other question, it is the same but it is not working for what LordDragonZord asked. You can look at your alt account for my PM