Id from a table reads as nil when sent through remote event

Hello again, i’m making a character creation system and reading id’s from tables to sending them through remote events, and the string is returning nil.

Table (note this happens for all of them, i’m just picking one out) :

local FaceS = {
	
	SmileyFace = "rbxasset://textures/face.png",
	ChillFace = "7074764",
	SillyFace = "7699174",
	LazyEyeFace = "7075502",
	CheckItFace = "7074786",
	FrecklesFace = "12145366",
	SkepticFace = "31117267",
	SomeConfusedFace = "7075469"
	
}

LocalScript firing line:

CreateCharacterEvent:FireServer("Face",FaceS[FacesSelectionNumber],PlayerHumanoidDescription,PlayerHumanoid)

FacesSelectionNumber = a number used to navigate the table
“Face” = the property of the player’s humanoiddescription
PlayerHumanoidDescription and Humanoid description are just their normal instances.

Server script event line:

CreateCharacterEvent.OnServerEvent:Connect(function(player,hdstring,hdid,hd,hum) 
	print(typeof(player))
	print(typeof(hdstring))
	print(typeof(hdid))
	print(typeof(hd))
	print(typeof(hum))
	hd[hdstring] = hdid
	hum:ApplyDescription(hd)
end)

hdstring,hdid,hd and hum are the same things from the localscript.

Thank you in advance if you can help me out.

You have a dictionary here, dictionaries are indexed with keys.

you need to do FaceS["SmileyFace"] or any of the other keys.

Oh right, i assume it would help if i removed the words and just left the id’s in.

1 Like