mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
|
| 27 Apr 2012 10:03 AM |
I'm trying to make a script for my friend who wants a Car Paint shop on his game where you can change your cars color but I'm having trouble making the script because Ouput says theres nothing wrong with it but it won't work. Can somebody help me?
t = script.Parent.Parent.Parent.Parent.Parent.Character.Car function onClicked() c = t:children() for n = 1, #c do if (c[n].className == "Part") then local P = (c[n]:findFirstChild("Color") if (P~=nil) then c[n].BrickColor = Color3.new("Bright Red") end end
if (c[n].className == "WedgePart") then local W = (c[n]:findFirstChild("Color") if (W~=nil) then c[n].BrickColor = Color3.new("Bright Red") end end end end script.Parent.MouseButton1Down:connect(onClicked) |
|
|
| Report Abuse |
|
|
DXPower
|
  |
| Joined: 21 Oct 2008 |
| Total Posts: 2866 |
|
|
| 27 Apr 2012 10:05 AM |
| Try putting prints in various locations, that may help. |
|
|
| Report Abuse |
|
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
| |
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
|
| 27 Apr 2012 11:29 AM |
| Nothing. It shows all of the prints and doesn't say anything is wrong. |
|
|
| Report Abuse |
|
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
|
| 27 Apr 2012 11:29 AM |
Can anybody fix this?
t = script.Parent.Parent.Parent.Parent.Parent.Character.Car function onClicked() c = t:children() for n = 1, #c do if (c[n].className == "Part") then local P = c[n]:findFirstChild("Color") if (P~=nil) then c[n].BrickColor = Color3.new("Bright Red") end end
if (c[n].className == "WedgePart") then local W = c[n]:findFirstChild("Color") if (W~=nil) then c[n].BrickColor = Color3.new("Bright Red") end end end end script.Parent.MouseButton1Down:connect(onClicked) |
|
|
| Report Abuse |
|
|
BAUER102
|
  |
| Joined: 03 Apr 2010 |
| Total Posts: 5936 |
|
|
| 27 Apr 2012 12:17 PM |
The Roblox output seems to be glitchy in the last time. I've had multiple cases of errors and the output didn't noticed it.
I'll look at your script. |
|
|
| Report Abuse |
|
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
| |
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
|
| 28 Apr 2012 04:34 AM |
| Can nobody help because I'm having no luck? |
|
|
| Report Abuse |
|
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
|
| 28 Apr 2012 04:49 AM |
I tried this on too but it didn't work either;
t = script.Parent.Parent.Parent.Parent.Parent.Character.Car function onClicked() c = t:children() for n = 1, #c do if (c[n].className == "Part") then local P = c[n]:findFirstChild("Color") if (P~=nil) then c[n].BrickColor = BrickColor.new(21) end end
if (c[n].className == "WedgePart") then local W = c[n]:findFirstChild("Color") if (W~=nil) then c[n].BrickColor = BrickColor.new(21) end end end end script.Parent.MouseButton1Down:connect(onClicked) |
|
|
| Report Abuse |
|
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
|
| 28 Apr 2012 04:51 AM |
It doesn't matter guys. I've done it. YAY!
|
|
|
| Report Abuse |
|
|