So… I honestly, don’t know what to do from here.
I have made many attempts to make commands for shirts and pants, and the only way to make the shirts and pants work, is by manually doing it in studio, and configuring the ID inside the script.
What I am trying to achieve - Player types /shirt or /pants with an ID, it grabs ID from catalog, and places that onto the character.
Script works perfectly, just confused with this bug.
game.Players.PlayerAdded:Connect(function(player) -- When they join
player.CharacterAppearanceLoaded:Connect(function(char) -- When their character loads
player.Chatted:Connect(function(message) -- When they chat
if player:IsInGroup(GroupID) then -- We check if their in group
local lower = message:lower() -- Getting the message lower
local args = lower:split(" ") -- Splitting the message
--[ UNIFORM COMMAND ]--
if args[1] == Prefix.. "shirt" then -- Checking if they did /shirt ____
local shirtID = args[2]
local Shirt = char:FindFirstChild("Shirt") -- FINDING SHIRT
if Shirt then
Shirt.ShirtTemplate = "rbxassetid://"..shirtID -- CHANGING SHIRT
end
elseif args[1] == Prefix.. "pants" then -- Checking if they did /pants _____
local pantsID = args[2]
local Pants = char:FindFirstChild("Pants") -- FINDING PANTS
if Pants then
Pants.PantsTemplate = "rbxassetid://"..pantsID -- CHANGING PANTS
end
end
else
print("Not In Group") -- Letting us know their not in group
end
end)
end)
end)
NOTE : Many developers have encountered this, though I have not found an answer. Anyone understand why this is happening?