please help, my script isn’t working for some reason, I am sure it is correct.
local onClicked = script.Parent
local item_id = "6493716017" -- DONT FORGET TO SET THIS OKAY KYE
onClicked.MouseButton1Click:Connect(function()
game:GetService("MarketplaceService"):PromptPurchase(item_id)
end)
@vvKyee Use a local script to detect the MouseButton1Click inside the GUI. You should then use a RemoteEvent and Fire it when the button is clicked and it will prompt you from a ServerSide script.
Example:
local onClicked = script.Parent
local item_id = "6493716017" -- DONT FORGET TO SET THIS OKAY KYE
onClicked.MouseButton1Click:Connect(function()
RemoteEvent:FireServer(item_id)
end)