Master Module

Functions:

  • get_outfits <string/number/Instance>

  • load_outfit <number/string,array>

  • resetcache <void>

Examples:

get_outfits:

This function is required to fetch a player's outfits.

Arguments required:

  • username, userId or player object <string/number/Instance>

local module = require(script.Parent) -- module location.

local result = module.get_outfits("ROBLOX") -- username, userId, and player objects are supported.

local amount = result.amount; -- number, amount of outfits player has.
local outfits = result.outfits; -- array of outfits.

Don't forget: you can use a userId or player object to fetch outfits too!

load_outfit:

Arguments required:

  • outfitId <number>

  • options <array> (setName [bool] onFullyLoaded [function] defaultParent [Instance])

This function is required to fetch an outfit object.

local module = require(script.Parent) -- module location.

local result = module.get_outfits("ROBLOX") -- username, userId, and player objects are supported.

local amount = result.amount; -- number, amount of outfits player has.
local outfits = result.outfits; -- array of outfits.

for outfitName, outfidId in pairs(outfits) do
	local outfit = module.load_outfit(outfidId); -- fetches the outfit
	outfit.Parent = workspace; -- parent it
end

There's customization for this readily available, here's an example:

local module = require(script.Parent) -- module location.

local result = module.get_outfits("ROBLOX") -- username, userId, and player objects are supported.

local amount = result.amount; -- number, amount of outfits player has.
local outfits = result.outfits; -- array of outfits.

for outfitName, outfidId in pairs(outfits) do
	local outfit = module.load_outfit(outfidId,{
		defaultParent = workspace; -- object default parent
		setName = true; -- set the display name to the outfit name? setting to false will result with no name.
		onFullyLoaded = function()
			-- your callback here! this is called when it's fully loaded.
		end
	}); -- fetches the outfit
end

If you still have any questions, please don't hesitate to ask likeajumpingpro/Toxic#2799

Last updated

Was this helpful?