How do I use Humanoid Description to save players character

How do I use Humanoid Description to save players characters data

1 Like

Well you can’t save a players character data with Humanoid Descriptions. What you can do is use a Datastore.

You would most likely have to save a table containing all of the Humanoid Descriptions properties.

1 Like

You cannot use Humanoid Description to save data, use Datastores to save data

Ok but I was searching the devhub but found nothing I dont want to save players money I want to save like there body color, hair, eyes etc.

Datastore can save anything. Datastores are used for data like a user’s money, yes, but you can also be used to store the player’s body color, hair, eyes, etc.

Ok but how do I save the players character then (like a script)

Here if you want to learn more about datastores.

(Note, this didn’t work for me but I’m pretty sure cause I’m in studio.)

Here’s a script that save’s the player’s face when they join. Should give you an idea of how to use datastores.

local DataStoreService = game:GetService("DataStoreService")
local FaceDataStore = DataStoreService:GetDataStore("FaceDataStore")

	local Folder ="Folder", Player)
	Folder.Name = "Stats"
	local Value ="StringValue", Folder)
	Value.Value = Player.Character:WaitForChild("Head"):FindFirstChild("face").Texture
	local Key = Player.UserId .."_key"
	local Success, CurrentFaceSave = pcall(function()
		return FaceDataStore:GetAsync(Key)
	if Success then
		print("Successfully found player's save.")
		Player.Character:WaitForChild("Head"):FindFirstChild("face").Texture = CurrentFaceSave

	local Key = Player.UserId .."_key"
	local Success, Err = pcall(function()
		FaceDataStore:SetAsync(Key, Player["Stats"]["Value"].Value)
	if Success then
		print("Successfully saved ".. Player.Name .."'s face!")

Ok thank you :grinning: :grinning:

Ok but how does this script saves body colors

Note, that storing this in a data store is a bad idea.

If the player ever changes their avatar, your game wont update, so unless thats what you want ( a representation of the players avatar at a point in time) you should be using Players:GetHumanoidDescriptionFromUserId() instead. You don’t have to go through the mess of storing it, it’ll update when a player changes their avatar, and is probably faster anyway.