|
| 17 Oct 2011 01:51 PM |
function Enter(newPlayer) if newPlayer:IsInGroup(412472) ~= nil then newPlayer.TeamColor=script.Parent.TeamColor end end
game.Players.ChildAdded:connect(Enter)
If not, than please fix it for me. |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 17 Oct 2011 01:52 PM |
local x = 0 function Enter(newPlayer) x = 0 if newPlayer:IsInGroup(412472) then x = 1 end if x == 0 then newPlayer.TeamColor=script.Parent.TeamColor end end |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
| |
|
| |
|
|
| 17 Oct 2011 01:59 PM |
or use 'else' ?
function Enter(newPlayer) if newPlayer:IsInGroup(412472) then -- stuff here for group else -- stuff here for non group end end |
|
|
| Report Abuse |
|
|
|
| 17 Oct 2011 02:05 PM |
Will this work?
function Enter(newPlayer) if newPlayer:IsInGroup(412472) then newPlayer.TeamColor=script.Parent.TeamColor end else newPlayer.TeamColor.Hostiles.TeamColor end end |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Oct 2011 02:10 PM |
No connection line so no.
Game.Players.PlayerAdded:connect(function(p) if p:IsInGroup(412472) then p.TeamColor = script.Parent.TeamColor end end)
Also make the Hostiles team AutoAssignable. |
|
|
| Report Abuse |
|
|
|
| 17 Oct 2011 02:12 PM |
| But RATEX, that will make hostiles have to WALK to the hostiles spawn? |
|
|
| Report Abuse |
|
|
| |
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 17 Oct 2011 02:14 PM |
| No that would make them spawn at their own spawn, add a MoveTo line to tele your people to their teams spawn also. |
|
|
| Report Abuse |
|
|
|
| 17 Oct 2011 02:15 PM |
| Please post the whole script, I can't understand this. |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 17 Oct 2011 02:18 PM |
function Player(NewPlayer) if NewPlayer:IsInGroup(412472) then NewPlayer.TeamColor = script.Parent.TeamColor NewPlayer.Character:MoveTo(0,0,0)--Set Spawn Vector 3 end end Game.Players.PlayerAdded:connect(Player) |
|
|
| Report Abuse |
|
|
|
| 17 Oct 2011 02:20 PM |
| Yes, that makes the person IN the group spawn at certain spawnpoint. But what I'm asking is how to make some NOT in group 412472 spawn at a DIFFERENT spawnpoint. I don't see how that script does that. |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 17 Oct 2011 02:22 PM |
| The script doesnt have to, you set the hostile spawn point and make their team auto-assiged. |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Oct 2011 02:27 PM |
So this should do it?
function Player(NewPlayer) if NewPlayer:IsInGroup(412472) then NewPlayer.TeamColor = script.Parent.TeamColor NewPlayer.Character:MoveTo(420.5, 15.2, -245.5)--Set Spawn Vector 3 end end Game.Players.PlayerAdded:connect(Player) |
|
|
| Report Abuse |
|
|
| |
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 17 Oct 2011 02:36 PM |
| If you house it in a Team or BrickColor Value then yes. |
|
|
| Report Abuse |
|
|