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 » Scripting Helpers
Home Search
 

Re: Only Certain People Can Touch This Spawn [HELP]

Previous Thread :: Next Thread 
TheSoMekTime is not online. TheSoMekTime
Joined: 14 Mar 2009
Total Posts: 191
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 is not online. 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
TheSoMekTime is not online. TheSoMekTime
Joined: 14 Mar 2009
Total Posts: 191
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 is not online. 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
TheSoMekTime is not online. TheSoMekTime
Joined: 14 Mar 2009
Total Posts: 191
02 Mar 2012 09:26 PM
And I insert this into the spawn correct?
Report Abuse
TheSoMekTime is not online. TheSoMekTime
Joined: 14 Mar 2009
Total Posts: 191
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
ThouArtNoob is not online. ThouArtNoob
Joined: 12 Nov 2009
Total Posts: 212
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
TheSoMekTime is not online. TheSoMekTime
Joined: 14 Mar 2009
Total Posts: 191
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
TheSoMekTime is not online. TheSoMekTime
Joined: 14 Mar 2009
Total Posts: 191
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
TheSoMekTime is not online. TheSoMekTime
Joined: 14 Mar 2009
Total Posts: 191
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
TheSoMekTime is not online. TheSoMekTime
Joined: 14 Mar 2009
Total Posts: 191
02 Mar 2012 10:21 PM
Alright, I've fixed it, no worries guys, thanks for all your help.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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