How could I get how much RAP the player has?

I’d like to get the amount of RAP every player has and then put it into the leaderboard. Would I be using MarketplaceService? This is a example of the values that I found -
I am wondering how to do this.


I would check the API Reference ( for MarketplaceService just to get a wide reference of it, and then come back to us if you’ve come out empty.

I don’t think Roblox Lua allows this. You have multiple solutions to the problem here:

  1. You make a post on #platform-feedback:engine-features
  2. You read off an external plugin, the only way I could imagine going about this is HttpsService and an third-party browser plugin.

Doesn’t Trade Hangout have this? If it does, then it’s possible.

I expect the game uses the second solution I listed above.

What do you specifically mean by a third-party browser plugin?

Something like Roblox+ which allows you to view players’ RAP.

This is all I could find

-- refresh LimitedItems list every 2 minutes
-- fire remote every time LimitedItems updates
-- add rap tag over people's heads when they spawn
-- refresh UserAsset list on demand

function numerify(v)
	if v < 1000 then
		return ""
	elseif v >= 1000000 then
		return string.format("%.1fM+", v/1000000)
			elseif v >= 10000 then
		return string.format("%dk+", v/1000)
	elseif v >= 1000 then
		return string.format("%.1fk+", v/1000)

-- Modules
local LimitedItems = require(game.ServerStorage.Classes.LimitedItems)
local UserLimiteds = require(game.ServerStorage.Classes.UserLimiteds)
local UserLimitedTags = require(game.ServerStorage.Classes.UserLimitedTags)

-- Services
local Players = game:GetService("Players")
local DataStoreService = game:GetService("DataStoreService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local DataStoreService = game:GetService("DataStoreService")

local RapDataStore = DataStoreService:GetOrderedDataStore("RecentAveragePrice")

local Settings = {
	RefreshDebounce = 60 * 4;

There’s a lot more to this script, if you want me to send it.


Thanks, I see how this script is going.

1 Like

And here is a another thing that looks like it will be relevant:

function addRapTag(player)
	local userLimiteds = UserLimiteds.GetByUserID(player.userId)
	local rap = userLimiteds:GetRAP()
	--print("Adding rap tag")
	local character = player.Character or player.CharacterAdded:wait()
	local head = character:WaitForChild("Head")
	local tag ="BillboardGui")
	tag.Name = "RapTag"
	tag.Size =,0,1,0)
	tag.StudsOffset =,3,0)
	local label ="TextLabel")
	label.BackgroundTransparency = 1
	label.Size =,0,1,0)
	label.ClipsDescendants = true
	label.TextColor3 = Color3.fromRGB(0, 144, 244)
	label.TextStrokeColor3 = Color3.fromRGB(0, 45, 76)
	label.TextScaled = true
	label.TextStrokeTransparency = 0.5
	label.Text = numerify(rap)
	label.Font = Enum.Font.SourceSans
	label.Parent = tag
	tag.Parent = head
	tag.Adornee = head
	--print("Added rap tag")
local rapLimit = 100000 -- must have 100k to hang out in the lounge

function updateRapRanking(player,rap)
	--print("Creating leaderstats for " .. player.Name)
	local leaderstats = player:FindFirstChild("leaderstats")
	if not leaderstats then
		leaderstats ="Model")
		leaderstats.Name = "leaderstats"
		leaderstats.Parent = player
	local rapValue = leaderstats:FindFirstChild("RAP")
	if not rapValue then
		rapValue ="IntValue")
		rapValue.Name = "RAP"
		rapValue.Parent = leaderstats
	rapValue.Value = rap

	--print("Updating points for " .. player.Name)
	local PointsService = game:GetService("PointsService")
	--print("Updating RAP in data store")
	RapDataStore:SetAsync(tostring(player.userId), rap)
	local currentPoints = PointsService:GetGamePointBalance(player.userId)
	local pointDifference = rap - currentPoints
	if not (pointDifference == 0) then

function onPlayerAdded(player)
	local userId = player.userId
	--print("Getting UserLimiteds for user " .. userId)
	local userLimiteds = UserLimiteds.GetByUserID(userId)
	--print("Retrieved UserLimiteds")
	local rap = userLimiteds:GetRAP()
	if (rap >= rapLimit) then
		local tag ="StringValue")
		tag.Name = "LoungeAccess"
		tag.Parent = player

function onCharacterAdded(player)
	--print("CharacterAdded for " .. player.Name)

function onPlayerRemoving(player)
	if player then
		--print("Player " .. player.Name .. " is leaving")

	for _,player in pairs(Players:GetPlayers()) do


Little late but there is an API for this!!/Inventory/get_v1_users_userId_assets_collectibles


How would I apply this in game?

With a helpful proxy, such, you can access this in-game with HttpService’s GetAsync and Decode it into a Lua table via JSONDecode.

Here’s a simple example:

local HttpService = game:GetService("HttpService")

local UserId = 1 --// UserId of the person you want to find the RAP of
local URL = string.format("", UserId)

local Data = HttpService:GetAsync(URL) --// Send a GET request to the proxy 
local DecodedData = HttpService:JSONDecode(Data) --// Make the data into a valid Lua table
local TotalRAP = 0

for _, Item in ipairs( do --// Iterate through and add each item's RAP
    TotalRAP = TotalRAP + Item.recentAveragePrice

I am having a bit of trouble creating the proxy…

I can get this to work -
But this does not work when I click on it. Will it work in-game?

Without a proxy, you cannot send requests to Roblox’s own domains in-game (blocked by Roblox themselves).
A hosted application could be used as well, where you’d send a GET to it and it’d send a GET to the API.

No, I just found out what I did wrong. Your link was right I was unaware of the ‘%d’ I am testing currently with my inventory.

1 Like

Last question, how can I make

local UserId = 1

into where whenever a player joins their RAP gets set.
How do I also set the TotalRAP val into a int value?
This is what I got

local HttpService = game:GetService("HttpService")

--// UserId of the person you want to find the RAP of
local URL = string.format("", UserId)
local UserId = player.UserId
local Data = HttpService:GetAsync(URL) --// Send a GET request to the proxy 
local DecodedData = HttpService:JSONDecode(Data) --// Make the data into a valid Lua table
local TotalRAP = 0

for _, Item in ipairs( do --// Iterate through and add each item's RAP
    TotalRAP = TotalRAP + Item.recentAveragePrice
local leaderstats1 = player.leaderstats1
local RAP ="IntValue")
	RAP.Name = "RAP"
	RAP.Parent = leaderstats1
	RAP.Value = TotalRAP

I am also getting some output errors on Line 5

It is because you declared UserID after line 5 (when you are calling it)
Move UserId before URL and I would set the Variable name to “UserID” case specific, because UserId is a property of Player

1 Like

Here’s a working Version of what you want:

local HttpService = game:GetService("HttpService")

local UserId = player.UserId
local URL = string.format("",UserId)
local Data = HttpService:GetAsync(URL)
local DecodedData = HttpService:JSONDecode(Data)
local TotalRAP = 0

for _, Item in ipairs( do
	TotalRAP = TotalRAP + Item.recentAveragePrice
 	local stats ="Folder",player)
  	stats.Name = "leaderstats"
	local RAP ="IntValue",stats)
	RAP.Name = "Rap"
	RAP.Value = TotalRAP