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
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
| |
|
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
|
  |
| Joined: 26 Jan 2012 |
| Total Posts: 3580 |
|
|
| 17 Nov 2016 04:39 PM |
local p = game.Players.LocalPlayer
print(p.Name)
|
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|