yoshiwars
|
  |
| Joined: 27 Jul 2009 |
| Total Posts: 216 |
|
|
| 13 Feb 2014 08:11 PM |
Why this doesn't work?
if player.TeamColor == BrickColor("Bright red") then --code end
|
|
|
| Report Abuse |
|
|
|
| 13 Feb 2014 08:13 PM |
Try: if player.TeamColor = "Bright red" then
end |
|
|
| Report Abuse |
|
|
dodleman
|
  |
| Joined: 22 Dec 2007 |
| Total Posts: 1118 |
|
|
| 13 Feb 2014 08:15 PM |
omg
if player.TeamColor == BrickColor.new("Bright red") then stuff end |
|
|
| Report Abuse |
|
|
yoshiwars
|
  |
| Joined: 27 Jul 2009 |
| Total Posts: 216 |
|
| |
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 13 Feb 2014 08:28 PM |
| Then their TeamColor isn't what you specified or player is nil. |
|
|
| Report Abuse |
|
|
dodleman
|
  |
| Joined: 22 Dec 2007 |
| Total Posts: 1118 |
|
|
| 13 Feb 2014 08:28 PM |
| Actually it does work thank you. Post your script skid. |
|
|
| Report Abuse |
|
|
yoshiwars
|
  |
| Joined: 27 Jul 2009 |
| Total Posts: 216 |
|
|
| 13 Feb 2014 08:35 PM |
(the whole thing)
red = game.Lighting.red blue = game.Lighting.blue
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) if character:findFirstChild("Shirt") ~= nil then character.Shirt:Remove() end if character:findFirstChild("Pants") ~= nil then character.Pants:Remove() end if player.TeamColor == BrickColor.new("Bright red") then rs = red.Shirt:Clone() rp = red.Pants:Clone() rs.Parent = character rp.Parent = character elseif player.TeamColor == BrickColor.new("Bright blue") then bs = blue.Shirt:Clone() bp = blue.Pants:Clone() bs.Parent = character bp.Parent = character end end) end) |
|
|
| Report Abuse |
|
|
dodleman
|
  |
| Joined: 22 Dec 2007 |
| Total Posts: 1118 |
|
|
| 13 Feb 2014 08:39 PM |
| CharacterAdded doesn't always work when the player arrives. Kill the player when they enter or make a separate function and call it when they arrive and when they CharacterAdded |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2014 08:47 PM |
player = game.Players.LocalPlayer
if player.TeamColor == BrickColor.new("Bright red") then --code end
or
game.Players.PlayerAdded:connect(function(player) if player.TeamColor == BrickColor.new("Bright red") then --code end) |
|
|
| Report Abuse |
|
|
yoshiwars
|
  |
| Joined: 27 Jul 2009 |
| Total Posts: 216 |
|
|
| 13 Feb 2014 09:06 PM |
I did this and its working but the thing is after death it stops working
------------------------------------------------------------------------- player = game.Players.LocalPlayer character = player.Character red = game.Lighting.red blue = game.Lighting.blue
function uni() if character:findFirstChild("Shirt") ~= nil then character.Shirt:Remove() end if character:findFirstChild("Pants") ~= nil then character.Pants:Remove() end if player.TeamColor == BrickColor.new("Bright red") then rs = red.Shirt:Clone() rp = red.Pants:Clone() rs.Parent = character rp.Parent = character elseif player.TeamColor == BrickColor.new("Bright blue") then bs = blue.Shirt:Clone() bp = blue.Pants:Clone() bs.Parent = character bp.Parent = character end
end uni() |
|
|
| Report Abuse |
|
|