|
| 26 Jun 2014 03:11 AM |
but it doesn't work, please help
permission = {"lvl45Sandslash"}
function checkOkToLetIn(name) for i = 1,#permission do if (string.upper(name) == string.upper(permission[i])) then return true end end return false end
function onPlayerEntered(newPlayer) print("Person Spawned") local human = newPlayer:findFirstChild("Backpack") if (human ~= nil ) then if (checkOkToLetIn(human.Parent.Name)) then human.Parent.TeamColor=script.Parent.TeamColor end end end
game.Players.ChildAdded:connect(onPlayerEntered) |
|
|
| Report Abuse |
|
|
JustinJsT
|
  |
| Joined: 26 Sep 2010 |
| Total Posts: 7818 |
|
| |
|
|
| 26 Jun 2014 03:34 AM |
| Why not make a "SpawnLocation" and Make a team then disable Neutral then change the Team Color to your Team Color? |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2014 03:50 AM |
UOnlySpawnPoint = Path to part you want to spawn at
game.Players.ChildAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) if char.Name == "YourNameHere" then char.Torso.CFrame = CFrame.new(UOnlySpawnPoint.Position+Vector3.new(0,5,0)) end end) end)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Or if you wanna have multiple peopless..
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VipSpawnPeoplez = {"Yourname","Goulstem","Friends Name","Doge"} VipSpawnPoint = Path to part you want to spawn at
game.Players.ChildAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) if table.concat(VipSpawnPeoplez," "):match(char.Name) then char.Torso.CFrame = CFrame.new(VipSpawnPoint.Position+Vector3.new(0,5,0)) end end) end)
--scripts go shorter if'd table.concat ._.
|
|
|
| Report Abuse |
|
|