DataModel unavailable?

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

1 Like

A lot of the time, a lot of these Web functions only work in live sessions; try checking if that’s the reason why.

1 Like

Have you seen this post before? Possibly check if char has a parent before running HumanoidApplyDescription?

Just trying to get the ball rolling by searching the DevForum for starting points.

I did, but I searched “DataModel Unavailable” as I titled the topic… Figured it’d bring it up… Only brought up 2 topics, neither relating to this in anyway so figured it wasn’t discussed yet…

Either way, thanks!