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

How do I print text with a value?

for example, I want to print something like level (x)

with x being the number. I already have a value named x, and I want to show x in the output with text in front of it. Does anyone have a way to do this?

1 answer

print("level ( "..yourvalue.Value.." )")

2 comments

0

Thanks, it worked!

0

You can also separate values with commas (which also adds a space), like: print("level:", x) and if there's a lot of variables involved it's nice to know how to use string.format: http://lua-users.org/wiki/StringLibraryTutorial (Ctrl+F for "string.format"), ex: print(string.format("Level (%s/%s)", level, maxLevel))

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