|
| 02 Mar 2012 09:03 PM |
Ok so I have two teams, Normal Builders and Administrators and basically, anyone that enters my place can possibly enter the Administrators team randomly, 50-50 chance. So I was wondering how I can make the Administrators spawn locked so that no one can spawn on it unless their name is included in the script.
So the script will look for the players name and if it's TheSoMekTime then I will directly spawn onto the Administrators spawn. |
|
|
| Report Abuse |
|
|
CrasyTrex
|
  |
| Joined: 13 Mar 2011 |
| Total Posts: 761 |
|
|
| 02 Mar 2012 09:11 PM |
game.Teams.Administrator.AutoAssignAble = false game.Workspace.AdminSpawn.TeamChangeOnTouch = false game.Players.ChildAdded:connect(function (plr) if plr.Name == "name of admin" then plr.TeamColor = game.Teams.Administrator.TeamColor plr.Character:BreakJoints() end end)
|
|
|
| Report Abuse |
|
|
|
| 02 Mar 2012 09:14 PM |
If I was to add more names would this work?
game.Teams.Administrator.AutoAssignAble = false game.Workspace.AdminSpawn.TeamChangeOnTouch = false game.Players.ChildAdded:connect(function (plr) if plr.Name == "name of admin" or if plr.Name == "name of admin" or if plr.Name == "name of admin" then plr.TeamColor = game.Teams.Administrator.TeamColor plr.Character:BreakJoints() end end)
So I could add more names. |
|
|
| Report Abuse |
|
|
CrasyTrex
|
  |
| Joined: 13 Mar 2011 |
| Total Posts: 761 |
|
|
| 02 Mar 2012 09:16 PM |
well this is what I would do admin = {"names", "more name", "another name"} game.Teams.Administrator.AutoAssignAble = false game.Workspace.AdminSpawn.TeamChangeOnTouch = false game.Players.ChildAdded:connect(function (plr) for i = 1,#admin do if plr.Name = [i]admin--not sure if this will work... test it =P plr.TeamColor = game.Teams.Administrator.TeamColor plr.Character:BreakJoints() end end end) |
|
|
| Report Abuse |
|
|
|
| 02 Mar 2012 09:26 PM |
| And I insert this into the spawn correct? |
|
|
| Report Abuse |
|
|
|
| 02 Mar 2012 09:35 PM |
| Wait, so your script is supposed to put me in the Administrators team as soon as I enter the place? That didn't work. |
|
|
| Report Abuse |
|
|
|
| 02 Mar 2012 09:37 PM |
game.Teams.Administrator.AutoAssignAble = false game.Workspace.AdminSpawn.TeamChangeOnTouch = false game.Players.ChildAdded:connect(function (plr) if plr.Name == "name of admin" or plr.Name == "name of admin" or plr.Name == "name of admin" then plr.TeamColor = game.Teams.Administrator.TeamColor plr.Character:BreakJoints() end end)
your script works, just removed some excess "ifs". |
|
|
| Report Abuse |
|
|
|
| 02 Mar 2012 09:46 PM |
| Do I also change the name of the Team and the Spawn Brick? 'Cause I noticed the game.Teams.Administrator should be game.Teams.Administrators and the game.Workspace.AdminSpawn should be game.Workspace.AdministratorSpawn |
|
|
| Report Abuse |
|
|
|
| 02 Mar 2012 09:57 PM |
| @ThouArtNoob It isn't working! I thought the script kills me once I enter the game and respawns me at the Administrator Spawn.. What's happening? |
|
|
| Report Abuse |
|
|
|
| 02 Mar 2012 10:06 PM |
Output:
08:05:32 - AutoAssignAble is not a valid member of Team 08:05:32 - Script "Workspace.AdministratorSpawn.Admins Spawn Lock Script", Line 1 |
|
|
| Report Abuse |
|
|
|
| 02 Mar 2012 10:21 PM |
| Alright, I've fixed it, no worries guys, thanks for all your help. |
|
|
| Report Abuse |
|
|