|
| 12 Aug 2016 03:35 PM |
How can I make it so when you touch a brick, it sets a brickcolorvalue in the workspace to your teamcolor?
the brickcolorvalue is just named, "Value". |
|
|
| Report Abuse |
|
|
|
| 12 Aug 2016 03:44 PM |
local touchPart = game.Workspace.TouchPart -- or any other part, really
touchPart.Touched:connect(function(touchingPart) local touchingTeamColor = touchingPart.Parent:findFirstChild("TeamColor") if touchingTeamColor then touchPart.TeamColor.Value = touchingTeamColor.Value end end) |
|
|
| Report Abuse |
|
|
|
| 12 Aug 2016 04:00 PM |
It was hard to read, but here is what I gathered:
local touchPart = game.Workspace.Challenge_Holder.Water_Obby.win_brick
touchPart.Touched:connect(function(touchingPart) local touchingTeamColor = touchingPart.Parent:findFirstChild("TeamColor") if touchingTeamColor then game.ServerScriptService["Main Script"].Winner.Value = touchingTeamColor.Value end end) |
|
|
| Report Abuse |
|
|