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

How to print a variable followed by something?

I can i print a variable?

local Role = Knight

print("Your role is"Role)

Edit; nvm i fgured it out, you just add a ","

1 answer

✓ Accepted answer

To merge arguments you should use ..:

print("Your role is "..Role)

Usage of a comma in your case will semi-work(It will print both but in reality, it's not merged). But If you want to apply it to TextLabel for example it wouldn't work.

local varibale1 = "hey"
local variable2 = "bye"

game.Workspace.Part.Name = varibale1,variable2 -- Will name it "hey"
game.Workspace.Part.Name = varibale1..variable2 -- Will name it "heybye"

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