Eqicness
|
  |
| Joined: 30 Apr 2017 |
| Total Posts: 283 |
|
|
| 07 Jul 2017 05:21 PM |
Like the title says, I'm trying to put the player's name into a GUI.}
local playername = workspace:WaitForChild(game.Players.LocalPlayer.Name) script.Parent.Text = "Welcome, " playername |
|
|
| Report Abuse |
|
|
|
| 07 Jul 2017 06:16 PM |
| That's a good question. IDEK myself. |
|
|
| Report Abuse |
|
|
|
| 07 Jul 2017 06:23 PM |
Next time you having a scripting question, I recommend you taking this here: https://forum.roblox.com/Forum/ShowForum.aspx?ForumID=33
Anyways, here's the script:
local player = game.Players.LocalPlayer local frame = script.Parent frame:WaitForChild("PlayerName").Text = player.Name --you can use this one frame:WaitForChild("PlayerName").Text = ("TEXT HERE, " .. player.Name) --or you can use this one
|
|
|
| Report Abuse |
|
|
Eqicness
|
  |
| Joined: 30 Apr 2017 |
| Total Posts: 283 |
|
|
| 07 Jul 2017 10:06 PM |
1. Thanks for your help, it worked perfectly!
2. https://forum.roblox.com/Forum/ShowForum.aspx?ForumID=33 is for all scripting things that are not help requests. It says that in the forum description. |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2017 12:52 AM |
I have an old model of that
Yeah, dude, whatever. |
|
|
| Report Abuse |
|
|
drysty
|
  |
| Joined: 07 Dec 2013 |
| Total Posts: 1913 |
|
|
| 08 Jul 2017 01:18 AM |
Yes, I have the script! It took me a few hours!
-realises its already done-
|
|
|
| Report Abuse |
|
|
|
| 08 Jul 2017 01:30 AM |
I realize that is the description, but if you take a look, most players request script help.
|
|
|
| Report Abuse |
|
|
|
| 08 Jul 2017 03:30 AM |
script.Parent.Text = ("Welcome "..game.Players.LocalPlayer.Name)
The reason why your script doesn't work
1. playername variable is an object not a string, workspace:WaitForChild(game.Players.LocalPlayer.Name) will return Player's character model not the name.
2. You didn't combine the string and the other value with ".." in your second line |
|
|
| Report Abuse |
|
|
Bxnan_a
|
  |
| Joined: 24 Nov 2015 |
| Total Posts: 676 |
|
|
| 08 Jul 2017 03:35 AM |
It looks like the script.Parent.Text = "Welcome, " playername part is from python xd
O YAH |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2017 03:37 AM |
Correct me if I'm wrong, I haven't used python in a while
But I thought in python it would be script.Parent.Text = "Welcome" + playernamr |
|
|
| Report Abuse |
|
|
Bxnan_a
|
  |
| Joined: 24 Nov 2015 |
| Total Posts: 676 |
|
|
| 08 Jul 2017 03:38 AM |
I'm pretty sure it was "Welcome, " playername
O YAH |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2017 03:42 AM |
Yeah, I just checked
It's "Welcome " + playername
You can use .append() and .join() to. |
|
|
| Report Abuse |
|
|
Bxnan_a
|
  |
| Joined: 24 Nov 2015 |
| Total Posts: 676 |
|
|
| 08 Jul 2017 03:43 AM |
Oh, in school I do "Welcome, " playername when I do my projects, and it works perfectly.
O YAH |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2017 04:06 AM |
| I guess , kinda work I don't know how to explain this by word so I'll just put it to practice And hope you get it hi = "Hello, " place = "World" hiplace = hi, place ######## # ## # ##### print (hi, place) Log : Hello, world (Prints 2 different values in one line) print (hiplace) Log : ("Hello ", "world") (I don't know what happen, but I guess it turned to a list?) print (hiplace2) Log : Hello, World (prints out a combined string) |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2017 04:07 AM |
Repost,
I guess , kinda work
I don't know how to explain this by word so I'll just put it to practice And hope you get it
hi = "Hello, " place = "World" hiplace = hi, place hp = hi + place
print (hi, place) Log : Hello, world (Prints 2 different values in one line)
print (hiplace) Log : ("Hello ", "world") (I don't know what happen, but I guess it turned to a list?)
print (hp) Log : Hello, World (prints out a combined string) |
|
|
| Report Abuse |
|
|