jackendra
|
  |
| Joined: 20 Mar 2011 |
| Total Posts: 66 |
|
|
| 13 Jun 2013 09:17 PM |
local m = Instance.new("Message", game.Workspace) admins = {} function onPlayerEntered(player) wait(3) --[[ local newplayer = Instance.new("StringValue") newplayer.Parent = game.Workspace newplayer.Name = (player) ]] -- Lol I realize now, that I was doing un needed work! -- Simply add the Players to the list when they enter :D
table.insert(admins,(player)) -- Inserts the player who entered into the table named admin print(table.concat(admins, ' ')) m.Text = (table.concat(admins, ' ')) end
game.Players.ChildAdded:connect(onPlayerEntered)
When the game is tested there is no message, or in solo nothing is printed? Whats the error? |
|
|
| Report Abuse |
|
|
mummymark
|
  |
| Joined: 10 Sep 2011 |
| Total Posts: 610 |
|
|
| 13 Jun 2013 09:25 PM |
What does the output say?
Also when you using a message whats the text?
ex: m.Text = "this is a text" |
|
|
| Report Abuse |
|
|
jackendra
|
  |
| Joined: 20 Mar 2011 |
| Total Posts: 66 |
|
|
| 13 Jun 2013 09:27 PM |
I thought I mentioned that above? There is a message in the workspace with the Text "" (Nothing) And there is nothing in the output, besides some error messages due to faulty plugins I made. |
|
|
| Report Abuse |
|
|
jackendra
|
  |
| Joined: 20 Mar 2011 |
| Total Posts: 66 |
|
|
| 13 Jun 2013 09:29 PM |
In fact, I did: "When the game is tested there is no message, and in solo nothing is printed?" "Wheres the error?"
Nearly word for word .-. |
|
|
| Report Abuse |
|
|
Desperian
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 3371 |
|
|
| 13 Jun 2013 11:34 PM |
Because you're adding the actual player object to the admin table, so of course there won't be any text.
Try, table.insert(admins,player.Name) |
|
|
| Report Abuse |
|
|
jackendra
|
  |
| Joined: 20 Mar 2011 |
| Total Posts: 66 |
|
|
| 14 Jun 2013 11:15 AM |
| Though about it, but I never tried, thank you! :D |
|
|
| Report Abuse |
|
|
jackendra
|
  |
| Joined: 20 Mar 2011 |
| Total Posts: 66 |
|
|
| 14 Jun 2013 11:21 AM |
Ok, again I tried it with your way, and nothing so I decided to wait longer before it adds the player to make sure that the players there. - Still nope. Waited less time. - Again Nope. Didnt wait at all. - Nope still
Whats going on ugh?!? |
|
|
| Report Abuse |
|
|
Desperian
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 3371 |
|
|
| 14 Jun 2013 11:24 AM |
| The player is loaded before the scripts are loaded in solo mode. So, try it in a test server. |
|
|
| Report Abuse |
|
|
jackendra
|
  |
| Joined: 20 Mar 2011 |
| Total Posts: 66 |
|
|
| 14 Jun 2013 11:34 AM |
Ok, I haven't tested that yet, but I'm pretty sure I ca get it from here. I hope. :P
Anyways.
::: THREAD CLOSED! ::: |
|
|
| Report Abuse |
|
|
jackendra
|
  |
| Joined: 20 Mar 2011 |
| Total Posts: 66 |
|
|
| 14 Jun 2013 11:45 AM |
I guess this project is dead, even used one of my working onEnter scripts, but when i tried to read from the table the who script breaks??
|
|
|
| Report Abuse |
|
|
jackendra
|
  |
| Joined: 20 Mar 2011 |
| Total Posts: 66 |
|
|
| 14 Jun 2013 11:46 AM |
admins = {""} master = "jackendra" function chat(msg) if msg == "who?" then local me = Instance.new("Message", game.Workspace) me.Text = (table.concat(admins, ' ')) end if msg == "reset" then game.Workspace[master]:BreakJoints() end local m = Instance.new("Hint", game.Workspace) function onPlayerRespawned(newPlayer) if (newPlayer).Name == "jackendra" then m.Text = "Testing, Creator has Entered" table.insert(admins,(player.Name)) wait(7) m:remove() end end
function onPlayerEntered(newPlayer) newPlayer.Changed:connect(function (property) if (property == "Character") then onPlayerRespawned(newPlayer) end end) end
end game.Players[master].Chatted:connect(chat) game.Players.PlayerAdded:connect(onPlayerEntered)
|
|
|
| Report Abuse |
|
|