So I am currently in the process of making a uniform system for a group, I have all of the RankIDs and Clothing ID’s stored in a folder in ServerStorage… I am sorting through it to get the highest rank uniform that the player has, then attempting to give them those clothes using Humanoid Descriptions.
Here is the code:
-- Made by 12904(Builder/Scripter)
local UniformFolder = game:GetService("ServerStorage"):WaitForChild("Uniforms")
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(chr)
local CurrentRank = plr:GetRankInGroup(UniformFolder.GroupID.Value)
local AllRanks = UniformFolder:GetChildren()
local TopNumber
for i,v in pairs(AllRanks) do
if v.Name ~= "GroupID" then
if CurrentRank >= v.Value then
if TopNumber then
if i > TopNumber then
TopNumber = i
end
elseif not TopNumber then
TopNumber = i
end
end
end
end
if TopNumber then
local CurrentUniform = AllRanks[TopNumber]
local Desc = chr.Humanoid:GetAppliedDescription()
Desc.Shirt = CurrentUniform.ShirtID.Value
Desc.Pants = CurrentUniform.PantsID.Value
print(Desc)
chr.Humanoid:ApplyDescription(Desc)
end
end)
end)
Then here is the layout of the folder:
(There will be more ranks in the future, I’ve tested it with 3, still got the same error)
https://gyazo.com/821993130713c6817e9b39d8657a8276
and finally here is the error:
https://gyazo.com/f847aaee9ef647d1691e5e5dc3844ffd
I do have a print right before it is attempting to Apply the description which is successful, as you can see in the picture above.
I am fairly new to working with HumanoidDescriptions so any help is appreciated!
*Tested both in studio and in-game, same error both sides, all done on the server side