|
| 17 May 2013 08:00 PM |
--Ok, so.. I want this script to take certain player names and when they spawn.. change (Humanoid) to "Game"
I got so far.
Game = (wolfhunterbear" , "baconmon" , "Randomdude1111")
game.Workspace.Game.Humanoid.Name = "Game"
end
--------------------------
Simplified version,
game.workspace.Wolfhunterbear.Humanoid.Name = Game
end
----------------------------
I want this to happen whenever certain name/s respawn/ enter the game. Basically like an admin script. |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 17 May 2013 08:02 PM |
local admins = {"azarth", "player1", "human", "iowntreese"}
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(character) repeat wait() until p for i = 1, #admins do if p.Name:lower() == admins[i] then character.Humanoid.Name = "Game" end end end) end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 May 2013 08:22 PM |
| Err, actually.. script doesn't work. |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
| |
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 17 May 2013 08:24 PM |
| Make sure the names in the table are lowercased. |
|
|
| Report Abuse |
|
|
|
| 17 May 2013 08:26 PM |
| this script is a local script and goes in workspace correct? |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 17 May 2013 08:27 PM |
| The script is a normal script that goes in workspace. The names in the table must be lowercase. |
|
|
| Report Abuse |
|
|
|
| 17 May 2013 08:33 PM |
what I have in my workspace ------------------- Script --------- local admins = {"azarth", "wolfhunterbear", "human", "iowntreese"}
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(character) repeat wait() until p for i = 1, #admins do if p.Name:lower() == admins[i] then character.Humanoid.Name = "GM" end end end) end)
-------------------------- I changed Game to GM |
|
|
| Report Abuse |
|
|
|
| 17 May 2013 08:35 PM |
| Got it working, just doesn't work in solo mode. I took an electric fence and changed Humanoid to GM to see if it would kill me, it did. Tyvm for your patience :) |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
| |
|