Welcome, (Player User) | Anyone know how to do this?

I need help with a script.

Does anyone know how to make it were you join the game and when you open the panel it says “Welcome, (The Admins Username)”?

Here is what I am talking about:
admingui

I have never done this script before.

Thanks for the help.

2 Likes

If it’s Local Script, then you can use this.

local player = game.Players.LocalPlayer

[PathToUi].Text = "Welcome, " ..player.Name
1 Like

Hey there, SxmplyJxsh!

That is simple.
Put a LocalScript in it and put the following text in the script:

local plr = game.Players.LocalPlayer
script.Parent.Text = "Welcome, "..plr.."."

Hope I could help! :smiley:

1 Like

You can concatenate the strings:

local player = game.Players.LocalPlayer
local welcomeMessage = put_the_path_here

welcomeMessage.Text = 'Welcome, ' .. player.Name .. '!'
2 Likes

It seems to not work. I might not have something put right.

Does this look right to you?

image

do “plr.Name” instead of just “plr”.

Correct usage is plr.Name, as you are addressing their name, doing it your way will return an error

So basically like this?

image

1 Like

Yeah that’s correct 3 0 c h a r s

1 Like

Also would I keep the Title: Welcome, ?

image

You can keep the current text (“Welcome,”), as it will be replaced anyway when the script executes. You can change the Text to “fart” and it will still print “Welcome, name”

Place a LocalScript inside the text and put this:
Sorry edited, I did an error.

local user = game.Players.LocalPlayer.Name
local txt = script.Parent

txt.Text = "Welcome, "..user
2 Likes

Thanks for the help @LuaAlbi!

Your’s has worked I have no idea why @gxenious did not work.

Thanks for the help you guys!

(I will have to add you on roblox so we can hang around @LuaAlbi)

1 Like

@SxmplyJxsh
You didn’t format it correctly, it’s meant to be

"Welcome, "..plr.Name

You forgot the "."s

1 Like

Oh I must of made a mistake. Sorry.

Thanks for explaining how to do it!

2 Likes