|
| 08 Jun 2012 04:31 PM |
This is all in a LocalScript, to get the mouse
script.Parent.Equipped:connect(function(mouse) function mouse.Button1Down:connect(function(m) if mouse.Target.Parent:findFirstChild("Humanoid") then if game.Players:findFirstChild(mouse.Target.Parent.Name).TeamColor == "Bright green" then script.Parent.HealSound:Play() game.Players:findFirstChild(mouse.Target.Parent.Name).TeamColor == "Bright red" end end end end)
No output. |
|
|
| Report Abuse |
|
|
|
| 08 Jun 2012 04:35 PM |
Hello? Hello? I'm different |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jun 2012 12:14 PM |
Edit:
script.Parent.Equipped:connect(function(mouse) mouse.Button1Down:connect(function(m) if mouse.Target.Parent:findFirstChild("Humanoid") then if game.Players:findFirstChild(mouse.Target.Parent.Name).TeamColor == "Bright green" then script.Parent.HealSound:Play() game.Players:findFirstChild(mouse.Target.Parent.Name).TeamColor = "Bright red" end end end) end)
No output. |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 09 Jun 2012 12:18 PM |
ehh.. TeamColor == BrickColor BrickColor != String |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2012 12:18 PM |
If I were you, I would first test for the player existing, then check for the team color being the same. If I remember correctly, the team color is actually a brick color, not a string, so you might need to do .TeamColor == BrickColor.new("Bright Green") I could be forgetting things though, or it could have changed since the last time I was here. |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2012 12:20 PM |
Editier
script.Parent.Equipped:connect(function(mouse) mouse.Button1Down:connect(function(m) if m.Parent:findFirstChild("Humanoid") then if game.Players:findFirstChild(m.Parent.Name).TeamColor == "Bright green" then script.Parent.HealSound:Play() game.Players:findFirstChild(m.Parent.Name).TeamColor = "Bright red" end end end) end)
|
|
|
| Report Abuse |
|
|
|
| 09 Jun 2012 12:26 PM |
| Made those BrickColor thing changes but still no workie |
|
|
| Report Abuse |
|
|
| |
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 09 Jun 2012 12:49 PM |
It's not a string.. It's brickcolor.. The other guy already told you to do if .BrickColor == BrickColor.new(color) then |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2012 12:56 PM |
--Made By GuideHelper~~
script.Parent.Equipped:connect(function(mouse) mouse.Button1Down:connect(function(m) if m.Parent:findFirstChild("Humanoid") then if game.Players:findFirstChild(m.Parent.Name).TeamColor == "Bright green" then script.Parent.HealSound:Play() game.Players:findFirstChild(m.Parent.Name).TeamColor = "Bright red" end |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2012 01:06 PM |
| Guide, I tried your script (and added ends) but no workie |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 09 Jun 2012 01:09 PM |
| I've already told you what to do. |
|
|
| Report Abuse |
|
|