How to assign several values to 1 variable?

Hey, what I try to do is taking a random number from each table and then put them in a textlabel on a board, I could do my own numbers but I want it to be random. How can get all of the values in one textlabel?

local mathBoard = script.Parent.MathBoard.Math.Number

local numberOne = {
	"1",
	"2",
	"3",
	"4",
	"5",
	"6",
	"7",
	"8",
	"9",
	"10",
}

local middle = {
	"+",
	"-",
	"×",
	"÷"
}

local numberTwo = {
	"1",
	"2",
	"3",
	"4",
	"5",
	"6",
	"7",
	"8",
	"9",
	"10",
}


n1 = numberOne[math.random(1,#numberOne)]
m = middle[math.random(1,#middle)]
n2 = numberTwo[math.random(1,#numberTwo)]

mathBoard.Text = n1,m,n2,"=","?"

Thank you for your help,
/Xsodar

1 Like

Can’t you do:

mathBoard.Text = n1 .. m .. n2 .. "=" .. "?"
2 Likes

Yes it worked, thank you, did not try that :slight_smile:

You would need to set the TextLabel to something like this:

mathBoard.Text = n1..m..n2.."=".."?"

The dots connect the strings together, if this is what you mean by assigning several variables to one variable.

EDIT: @HugeCoolboy2007 has the answer

1 Like

Yes, but thank you also, now I know.

Answering the title only;

local Gamer = game.Workspace, game.Chat

Most commonly used for pcalls which return multiple things

Unless I’m doing it wrong.