|
| 17 Apr 2012 06:42 PM |
function onHit(hit)script.Parent.BrickColor = BrickColor.new("Really red") end Title says all script is not working please help me out thank you. |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2012 06:43 PM |
I would add an if statment to check things, but you are mainly missing a connection line.
script.Parent.Touched:connect(onHit)
† KMXD † |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 17 Apr 2012 07:01 PM |
function onHit(hit) if hit.Parent.Humanoid ~= nil then script.Parent.BrickColor = BrickColor.new("Really red") end end script.Parent.Touched:connect(onHit) |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2012 07:02 PM |
| Wait.. How do you put that in the script please rewrite the script with the modification. |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2012 07:03 PM |
| OOOOOOHHHH makes more sense tanks |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 17 Apr 2012 07:06 PM |
Insert>Object>Part Insert>Object>Script Paste my script into there. Save, and play in online mode or play in solo. |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2012 07:06 PM |
What is this supposed to change the color of? Anything?
† KMXD † |
|
|
| Report Abuse |
|
|
dnd256
|
  |
| Joined: 24 Mar 2009 |
| Total Posts: 1373 |
|
|
| 17 Apr 2012 07:36 PM |
| How is it not working? Can you post the error code? |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2012 07:51 PM |
| Np error code just will not work |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2012 07:52 PM |
(sigh)
"What is this supposed to change the color of? Anything?"
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2012 08:02 PM |
| Just a brick thatyou walk on to make it change |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2012 08:03 PM |
Your legs? Then try:
function onHit(hit) if hit.Parent:FindFirstChild("Humanoid") then hit.BrickColor = BrickColor.new("Really red") end end script.Parent.Touched:connect(onHit)
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2012 08:04 PM |
*Facepalm* I understand you now...
function onHit(hit) if hit.Parent:FindFirstChild("Humanoid") then script.Parent.BrickColor = BrickColor.new("Really red") end end script.Parent.Touched:connect(onHit)
† KMXD † |
|
|
| Report Abuse |
|
|
| |
|
| |
|