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 » Scripting Helpers
Home Search
 

Re: Help

Previous Thread :: Next Thread 
halofire902 is not online. halofire902
Joined: 30 May 2010
Total Posts: 1587
11 Nov 2013 09:00 PM
How can you find a players name? And then change say the scripts name to the players name. So like this:(JUST AN EXAMPLE OF WHAT I WANT)


PlayersName = GetPlayername
script.Name = PlayersName





-//=auréolefeu902
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
11 Nov 2013 09:02 PM
Player.Name?
Report Abuse
halofire902 is not online. halofire902
Joined: 30 May 2010
Total Posts: 1587
11 Nov 2013 09:03 PM
But how..
Like GetPlayerName()?

-//=auréolefeu902
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
11 Nov 2013 09:03 PM
Game.Players.Blah.Name...
Report Abuse
expressmyself is not online. expressmyself
Joined: 19 Apr 2011
Total Posts: 1768
11 Nov 2013 09:03 PM
depends, Local or normal script if it's local den you use

game.LocalPlayer

I fnormal you use playeradded or a loop.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
11 Nov 2013 09:04 PM
game.Players.LocalPlayer.Name*
Report Abuse
halofire902 is not online. halofire902
Joined: 30 May 2010
Total Posts: 1587
11 Nov 2013 09:13 PM
k

-//=auréolefeu902
Report Abuse
halofire902 is not online. halofire902
Joined: 30 May 2010
Total Posts: 1587
11 Nov 2013 09:31 PM
Wait what about regular script?

-//=auréolefeu902
Report Abuse
Ekkoh is not online. Ekkoh
Joined: 22 Oct 2012
Total Posts: 524
11 Nov 2013 09:35 PM
script.Name = Game.Players["halofire902"].Name
> halofire902

"To sing when you live and to sing when you die" - George Ragan
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
11 Nov 2013 09:41 PM
"script.Name = Game.Players["halofire902"].Name"

If you're offering help don't make it unnecessarily complicated.

script.Name = game.Players.halofire902.Name

People are here to learn, not to be impressed by how much knowledge you have. Seriously why does this even need to be said.
Report Abuse
halofire902 is not online. halofire902
Joined: 30 May 2010
Total Posts: 1587
11 Nov 2013 09:42 PM
I mean the local player without being in a local script

-//=auréolefeu902
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
11 Nov 2013 09:44 PM
If you aren't using a LocalScript, your script is running in the server. There is no local player in the server, so you'll need to specify what you mean by "local player" if you want me to tell you how to get it from a Script.
Report Abuse
Ekkoh is not online. Ekkoh
Joined: 22 Oct 2012
Total Posts: 524
11 Nov 2013 09:49 PM
Calm it down Arc. I chose to do it that way because it was more clear where the name of the player came from. I've been around these forums for a good while now, I wouldn't be here if I was attempting to confuse people, I'm trying to help. Nor was I trying to act smart. It's funny actually, there's a lot of people like you on here that get some satisfaction out of sporadically attacking someone, and all I did was post a line of code.

"To sing when you live and to sing when you die" - George Ragan
Report Abuse
halofire902 is not online. halofire902
Joined: 30 May 2010
Total Posts: 1587
11 Nov 2013 09:53 PM
Okay, I want a script that I'm going to put in StarterGui, and I want it to find the players name..

Like say ounce it's in PlayerGui
It would get the name of the parent of the character. But
Some how when I did this it did not work so asked you guys
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
11 Nov 2013 10:48 PM
" there's a lot of people like you on here that get some satisfaction out of sporadically attacking someone, and all I did was post a line of code. "

I'm not sporadically attacking you, I'm expressing my discontent about people who come here and put new scripters on the wrong track. You /should/ know that almost every beginner uses the dot operator for indexing values in tables, so I have no patience for people using brackets to reference things when it's blatantly easier to just type ".". I'm here to be a nice guy and to help people learn, but you want to post confusing code for no reason you'll find yourself on my bad side very quickly.


-----------
"Okay, I want a script that I'm going to put in StarterGui, and I want it to find the players name.."

If you want to put it in the StarterGui, you should be using a LocalScript. In a localscript, if you want to local player's name, you should use

script.Name = game.Players.LocalPlayer.Name
Report Abuse
halofire902 is not online. halofire902
Joined: 30 May 2010
Total Posts: 1587
12 Nov 2013 02:02 PM
That's exactly what I wanted
Thanks
Report Abuse
Ekkoh is not online. Ekkoh
Joined: 22 Oct 2012
Total Posts: 524
12 Nov 2013 04:45 PM
"Confusing code" is subjective to whoever wrote it. And if you honestly think using brackets and quotes to index a value is that much more complicated than using the dot operator, then that's your opinion. I will say though, I was in no way trying to confuse the OP. I'm here to help him just as you are.

"To sing when you live and to sing when you die" - George Ragan
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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