Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I get the RAP of a player?

I understand that RAP means Recent Average Price on Limited(u) items, and to get the sum total you have to add them together.

My issue is on how to figure out if a player has that hat or not.

me = game:GetService("Players").TigerCaptain
lims = me:GetLimiteds() -- totally fake

local RAP = 0
for i,v in pairs(lims) do
print(v.Name)
RAP = RAP + v.Price
end

print(me.Name.." has "..RAP)

I know :GetLimiteds() does not exist, but I wish it would.

I do know you cannot use HttpService directly on the roblox website, so you have to use a mock-up website of roblox to keep the RAP updated.

Any help?

1 comment

0

try proxys

1 answer

local Player = game.Players.LocalPlayer -- get player locally from a local script
local MS = game:GetService("MarketplaceService")

function PlayerOwnsAsset(Player, id) -- function to check to see if player owns the item
	if MS:PlayerOwnsAsset(Player, id) then -- checks to see if player owns the item
		true
	end
end

function isLimitedU(id)
local item = MS:GetProductInfo(id) -- gets the product information
	if item.IsLimitedUnique then -- checks to see if it is limitedU
		return true
	end
end

local id = 00000 -- put id here
if PlayerOwnsAsset(Player, id) then
	if isLimitedU(id) then --- if has Limited then continue
		print(Player .. " has " .. MS:GetProductInfo(id).Name) -- Player has Item.Name
	end
end

Please upvote if this helps

This discussion is preserved as it was. New answers, comments, and votes are closed.