#UGC Purchase Button In-game

39 messages · Page 1 of 1 (latest)

elfin obsidian
#

How can I make a part in studio be able to be interacted with like this so I can sell my own UGCs in my own game?

sick gorge
#

simply detect ProximityPrompt.Triggered and prompt the purchase of the ugc

elfin obsidian
#

Do you know a tutorial or something I could follow?

sick gorge
elfin obsidian
#

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

sick gorge
#

i mean theres not gonna be any specific tutorial for it

elfin obsidian
#

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

sick gorge
#

add proximityprompts to them first

elfin obsidian
sick gorge
elfin obsidian
sick gorge
#

Server

#

local scripts dont run in workspace

elfin obsidian
#

Done that

sick gorge
#

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

elfin obsidian
#

I can interact with it but nothing happens

#

Let me try putting my item off and onsale again

sick gorge
#

in the output

elfin obsidian
#

There's no errors or anything when I interact

sick gorge
#

oh yeah

#

what did you name the proximity prompt?

#

and show me the hirearchy of the part

elfin obsidian
#

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?

elfin obsidian
#

ah perfect

#

thanks

#

This should give me the 70% fee now right?

#

based off of this

tender reef
#

idk

elfin obsidian