|
| 28 Jul 2014 09:29 PM |
function onTouched(hit) if(hit.Parent:FindFirstChild("Humanoid") == nil) then return end local player = game.Players:GetPlayerFromCharacter(hit.Parent) teamcolor = player.TeamColor
child.BrickColor = BrickColor.new(teamcolor)
end game.Workspace.Map:getChildren() child.Touched:connect(onTouched)
|
|
|
| Report Abuse |
|
|
|
| 28 Jul 2014 09:35 PM |
| Child is not declared when you try to apply 'Touched' |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2014 09:46 PM |
for i,v in next, game.Workspace.Map:GetChildren() do function onTouched(hit) if(hit.Parent:FindFirstChild("Humanoid") == nil) then return end local player = game.Players:GetPlayerFromCharacter(hit.Parent) teamcolor = player.TeamColor v.BrickColor = BrickColor.new(teamcolor)
end end
v.Touched:connect(onTouched)
|
|
|
| Report Abuse |
|
|