|
| 28 Feb 2015 03:32 PM |
Im trying to make a brick that when a player touches it, it turns the color of that players team. Below is what I have but the part just turns black.
script.Parent.Touched:connect(function(hit) if hit.Parent.Humanoid ~= nil then Player = game.Players:GetPlayerFromCharacter(hit.Parent) script.Parent.BrickColor = BrickColor.new(Color3.new(Player.TeamColor)) end end)
|
|
|
| Report Abuse |
|
|
Razurix
|
  |
| Joined: 30 Sep 2011 |
| Total Posts: 5376 |
|
|
| 28 Feb 2015 03:34 PM |
script.Parent.Touched:connect(function(hit) if hit.Parent.Humanoid ~= nil then plr = game.Players:GetPlayerFromCharacter(hit.Parent) script.Parent.BrickColor = plr.TeamColor end end)
Make sure this script is inside the brick.
Shut your pie hole |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 28 Feb 2015 03:34 PM |
1. Color3's are not brickcolors
2. TeamColor is a brickcolor
3. "Color3.new(Player.TeamColor)" is not the correct format
script.Parent.BrickColor = Player.TeamColor
|
|
|
| Report Abuse |
|
|
| |
|