How do I randomly select specific parts of the model?

			local bra = char.bottomrightarm.bottomrightartillery.bra1
			local bla = char.bottomleftarm.bottomleftartillery.bla1
			local mra = char.middlerightarm.middlerightartillery.mra1
			local mla = char.middleleftarm.middlelefthtartillery.mla1
			local tla = char.toprightarm.toprightartillery.tla1
			local tra = char.topleftarm.topleftartillery.tra1
			local bra2 = char.bottomrightarm.bottomrightartillery.bra2
			local bla2 = char.bottomleftarm.bottomleftartillery.bla2
			local mra2 = char.middlerightarm.middlerightartillery.mra2
			local mla2 = char.middleleftarm.middlelefthtartillery.mla2
			local tla2 = char.toprightarm.toprightartillery.tla2
			local tra2 = char.topleftarm.topleftartillery.tra2

Is there are way to form a table and randomly select specific amt of parts?

I don’t feel like formatting this for you as I’m on mobile rn, but here:

local T = {} —parts go in here

local randomPart = T[math.random(1, #T)]
1 Like

Oh thanks, but how would I put them in the tables? If possible give one example?

List your items like this:
Local BodyPartTable = {Char.Head, Char.RightArm, Char.LeftArm, ect}

Then to access just do
Print(BodyPartTable[1])

Should print
“Char.Head”

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.