What is the problem in this PromptPurchase script?

Hi Guys, so I was making something like a donation game for fun purposes. So I have a simple LocalScript which determines if a button inside SurfaceGui is pressed and it prompts a purchase for whatever we clicked. It works, but it works only for me, not for any other player.

local MPS = game:GetService("MarketplaceService")
local productsgui = workspace[script.Name].Products[script.Name].ScrollingFrame
local connections = {}

	if child:IsA("TextButton") then

I even tried prompting the purchase through this script, still nothing happened. Why is it just running for me and not for any other player playing the game ?
Thanks :slight_smile:

I fixed it on my own, it was just that I need to change MouseButton1Down to MouseButton1Click.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.