How do I sell Items as a developer product?

I have been trying and have looked all over the DevForum and Youtube, But I can’t figure out how to make it so when you buy a developer product the player receives the gear they purchased.
I’m sorry if it seems basic, I’m really stuck!

1 Like

Do you have a current script? If you do, then is there any errors/problems?

Check this article. Hope this helps. :wink:

https://developer.roblox.com/en-us/articles/Developer-Products-In-Game-Purchases

Try checking DevHub, there are several pages there useful for scripting

maybe try checking this page, it might be useful for this situation

1 Like

I used the Script from DevHub but the problem is it doesn’t give the item to the player when I test it, it just says I bought it. I don’t know how to make it so the player receives the item.

Can you show us the script or a video?

local productFunctions = {}

productFunctions[here your devproduct id] = function(receipt, player) 

   if player.Backpack then

-- here the code that clones the item from somewhere where you got the item like serverstorage or workspace

--example
      local ServerStorage = game:GetService("ServerStorage")
      local tool = ServerStorage.theToolYouWantToGive:Clone()

      tool.Parent = player.Backpack
--Indicate a successful purchase
      return true
   end
end

What I have so far:

```
elseif productId == 1232268064 then
	game.ServerStorage.Handgun:Clone().Parent=player.Backpack

Ok! Good news! I was putting them in Replicated storage instead of server, Thank you all so much for your help!

1 Like