Hello,
I was triying to use table.find()
to get the number of an element in this table
module.AccesoryTypesArray = {
[1] = "Image",
[2] = "TShirt",
[3] = "Audio",
[4] = "Mesh",
[5] = "Lua",
[8] = "Hat",
[9] = "Place",
[10] = "Model",
[11] = "Shirt",
[12] = "Pants",
[13] = "Decal",
[17] = "Head",
[18] = "Face",
[19] = "Gear",
[21] = "Badge",
[24] = "Animation",
[27] = "Torso",
[28] = "RightArm",
[29] = "LeftArm",
[30] = "LeftLeg",
[31] = "RightLeg",
[32] = "Package",
[34] = "GamePass",
[38] = "Plugin",
[40] = "MeshPart",
[41] = "HairAccessory",
[42] = "FaceAccessory",
[43] = "NeckAccessory",
[44] = "ShoulderAccessory",
[45] = "FrontAccessory",
[46] = "BackAccessory",
[47] = "WaistAccessory",
[48] = "ClimbAnimation",
[49] = "DeathAnimation",
[50] = "FallAnimation",
[51] = "IdleAnimation",
[52] = "JumpAnimation",
[53] = "RunAnimation",
[54] = "SwimAnimation",
[55] = "WalkAnimation",
[56] = "PoseAnimation",
[57] = "EarAccessory",
[58] = "EyeAccessory",
[61] = "EmoteAnimation",
[62] = "Video",
[64] = "TShirtAccessory",
[65] = "ShirtAccessory",
[66] = "PantsAccessory",
[67] = "JacketAccessory",
[68] = "SweaterAccessory",
[69] = "ShortsAccessory",
[70] = "LeftShoeAccessory",
[71] = "RightShoeAccessory",
[72] = "DressSkirtAccessory",
[73] = "FontFamily",
[76] = "EyebrowAccessory",
[77] = "EyelashAccessory",
[78] = "MoodAnimation",
[79] = "DynamicHead"
}
(Asset Types Ids) And when I try to find assets wich’s number is less of 5, ir returns me nil
. Examples:
print(table.find(require(game.ReplicatedStorage.MainModule).AccesoryTypesArray, "Hat"))-->nil
print(table.find(require(game.ReplicatedStorage.MainModule).AccesoryTypesArray, "BackAccessory"))-->nil
I readed the documentation of the table.find() functions and I think that it should work.
Important: Is not because of the jump of numbers from 5 to 8, I tried filling it and it continue whitout working.
I will thank any help, thanks!