#UGC Purchase Button In-game
39 messages · Page 1 of 1 (latest)
that is a proximityprompt
simply detect ProximityPrompt.Triggered and prompt the purchase of the ugc
I'm gonna be honest I got no idea how to do that
Do you know a tutorial or something I could follow?
do you know how to script?

I just want to be able to sell my UGCs in my game since apparently you get a 70% cut instead of a 30% if someone buys it through your game
i mean theres not gonna be any specific tutorial for it
I have a stall in my game and I want the player to be able to interact with the items on the table to be able to purchase them
add proximityprompts to them first
Yup I did that
now add a script in one of them
Normal or Local?
now inside the script
local MarketplaceService = game:GetService("MarketplaceService")
local proximityPrompt = script.Parent:WaitForChild("ProximityPrompt")
local ugcID = 0000000 --place your ugc ID here
proximityPrompt.Triggered:Connect(function(playerWhoTriggered)
MarketplaceService:PromptPurchase(playerWhoTriggered, ugcID)
end)
this should work although i havent tested it
we are listening for the .Triggered event and firing the PromptPurchase method
I can interact with it but nothing happens
Let me try putting my item off and onsale again
check for errors
in the output
There's no errors or anything when I interact
oh yeah
what did you name the proximity prompt?
and show me the hirearchy of the part
I didnt rename it
I tried putting it in the model first but the interact thing wouldnt show up so I put it inside of the mesh
Do i need to just add the script into the mesh instead?
ah perfect
thanks
This should give me the 70% fee now right?
based off of this
idk
ehh ill ask one of my friends to buy it to see if it works
