Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

is it possible to do this: a.Text = Variable"string" ?

so my variable is a string but for some reason it won't work? is it possible to say: example = "Hello" a.Text = example" World" all in one line?

1 comment

0

Both of the answers are correct. This is called "string concatenation", and the operator for it in Lua is .. I would suggest putting a space before and after it however.

2 answers

✓ Accepted answer

Yes, it is very possible to set the Text of a Gui to a variable, you would use two dots to combine the variable with a string. Like so:

example = "Hello"
a.Text = example.." World"

2 comments

0

thanks :D

0

No problem. (:

This is possible, but you're doing it wrong. Here's how you could do this.

VariableName = "Hello"
a.Text = VariableName.." World"

This discussion is preserved as it was. New answers, comments, and votes are closed.