Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I put My own text and a name of a player in one gui?

Asked by 5 years ago

I am trying to make Gui that says "You are <Insert Player Name>" but I do not know how to tell a script to have normal text and a string in the same line.

IDLabel = script.Parent
IDGui = IDLabel.Parent
StarterGui = IDGui.Parent
Player = StarterGui.Parent
ID = Player.Name
IDLabel.Text = ("You are playing as ")(ID)

04:46:23.099 - Players.ninja_eaglegamer.PlayerGui.IDGui.IDLabel.IDScript:6: attempt to call a string value 04:46:23.101 - Stack Begin 04:46:23.101 - Script 'Players.ninja_eaglegamer.PlayerGui.IDGui.IDLabel.IDScript', Line 6 04:46:23.102 - Stack End

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Hello,

To put string and other values/numbers together you would do the following:

print("You are playing as "..ANYVALUE)

Basically all you need to do is put the string and follow it with .. then the variable

Hopefully this helped you. :)

Ad

Answer this question