generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Game Design
Home Search
 

Re: How to put a player's name into a GUI?

Previous Thread :: Next Thread 
Eqicness is online. 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
SUPERGUY9098 is online. SUPERGUY9098
Joined: 09 Jul 2013
Total Posts: 5
07 Jul 2017 06:16 PM
That's a good question. IDEK myself.
Report Abuse
ExplodeLikeAVolcano is not online. ExplodeLikeAVolcano
Joined: 02 Nov 2013
Total Posts: 12146
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 is online. 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
LionPride8 is online. LionPride8
Joined: 21 Sep 2012
Total Posts: 522
08 Jul 2017 12:52 AM
I have an old model of that


Yeah, dude, whatever.
Report Abuse
drysty is not online. 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
ExplodeLikeAVolcano is not online. ExplodeLikeAVolcano
Joined: 02 Nov 2013
Total Posts: 12146
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
MonoBlockZ is online. MonoBlockZ
Joined: 22 Dec 2016
Total Posts: 578
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 is not online. 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
MonoBlockZ is online. MonoBlockZ
Joined: 22 Dec 2016
Total Posts: 578
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 is not online. 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
MonoBlockZ is online. MonoBlockZ
Joined: 22 Dec 2016
Total Posts: 578
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 is not online. 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
MonoBlockZ is online. MonoBlockZ
Joined: 22 Dec 2016
Total Posts: 578
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
MonoBlockZ is online. MonoBlockZ
Joined: 22 Dec 2016
Total Posts: 578
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image