Somthings wrong with Avatar Clothing…
local Shirts = {
"http://www.roblox.com/asset/?id=id here",
"http://www.roblox.com/asset/?id=id here",
}
local Pants = {
"http://www.roblox.com/asset/?id=id here",
"http://www.roblox.com/asset/?id=id here",
}
local char = script.Parent
-- Function to remove existing clothing
local function removeExistingClothing()
for _, item in ipairs(char:GetChildren()) do
if item:IsA("Shirt") or item:IsA("Pants") then
item:Destroy() -- Remove existing shirt or pants
end
end
end
-- Function to add a new random shirt and pants
local function addRandomClothing()
-- Remove existing clothing
removeExistingClothing()
-- Choose a random shirt
local shirtId = Shirts[math.random(1, #Shirts)]
local newShirt = Instance.new("Shirt")
newShirt.ShirtTemplate = shirtId
newShirt.Parent = char
-- Choose a random pants
local pantsId = Pants[math.random(1, #Pants)]
local newPants = Instance.new("Pants")
newPants.PantsTemplate = pantsId
newPants.Parent = char
end
-- Call the function to change clothing
addRandomClothing()
I get the ids from the Catalog…
For example
This shirt: Joker [+] - Roblox
has this id: 5025136077 (on the website)
On the Cloth Dummy with the Shirt it has this id: 5025136066 (in game)
Please help me what am i doing wrong and where can i find the right id!!!