Hello,
So I have a surface GUI inside of a part in the workspace. I know this is not very good practice using a server script for a GUI but the only other way I could use a local script is if I had the UI not in the workspace but in the player GUI section and adorne to the part but this is not possible in my case.
I thought it could be an issue with the prompt purchase first but when I put the prints there and it printed nothing I am guessing it is the problem with the mouse button click. I don’t think its an issue with the server script cuz I tried it with a local script first while I had it in startgui while I forgot I could not do it there but still no luck
Code in server script:
local ButtonClick = script.Parent
local MPS = game:GetService("MarketplaceService")
ButtonClick.MouseButton1Click:Connect(function(plr)
print("Runs!")
print(plr.Name)
MPS:PromptPurchase(plr, script.Parent.AssetID.Value)
end)
Shows what happen when I click: