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 » Scripters
Home Search
 

Re: Name Detect Help

Previous Thread :: Next Thread 
Moropio is not online. Moropio
Joined: 08 Dec 2007
Total Posts: 2620
17 Nov 2016 04:30 PM
IS there any way which returns the name of somebody in a 1 player server into a string variable?

Thanks


Report Abuse
caca50 is not online. caca50
Joined: 10 Jul 2011
Total Posts: 2037
17 Nov 2016 04:36 PM
Yes
Report Abuse
Moropio is not online. Moropio
Joined: 08 Dec 2007
Total Posts: 2620
17 Nov 2016 04:38 PM
Would you like to give me the script for it? Or some of the code for it


Report Abuse
spinywind is online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
17 Nov 2016 04:39 PM
local p = game.Players.LocalPlayer



print(p.Name)


Report Abuse
caca50 is not online. caca50
Joined: 10 Jul 2011
Total Posts: 2037
17 Nov 2016 04:40 PM
So do you mean like if there is a player in the current server, to put his name into a string value?

Like:

game.Players.PlayerAdded:connect(function(player)
local s = game.ServerStorage['String Value Name'].Value=player.Name
end)
?
Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
17 Nov 2016 04:41 PM
I actually, just did this.
Do like

player = nil

function getPlayer(plr)
player = plr
end
game.Players.PlayerAdded:connect(getPlayer)

As long as its a 1 player server, player will equal the player, so
print(player.Name)


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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