So I have this error where it would say "Workspace.danzflor.MidDanceFloor.CoreDancefloor:453: attempt to concatenate field '?' (a table value)" I cannot fix it as hard as I try it won't work can anyone else possibly fix it for me? Thanks on advanced!
local LetterTable = { [1] = {"A"}, [2] = {"B"}, [3] = {"C"}, [4] = {"D"}, [5] = {"E"}, [6] = {"F"}, [7] = {"G"}, [8] = {"H"}, [9] = {"I"}, [10] = {"J"}, } local chosenPad = LetterTable[math.random(1,#LetterTable)]..math.random(1, 10) print(chosenPad)
Hey.
This is because you are using the [X] = Y
syntax.
For the code you are trying to do, [X] = Y
is useless, as it has another job in tables than what you are trying to do.
There is a simple solution:
local LetterTable = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", } local chosenPad = LetterTable[math.random(1,#LetterTable)]..math.random(1, 10) print(chosenPad)
Hope this helps you!