| |
|
| |
|
| |
|
| |
|
| |
|
|
| 08 Feb 2013 05:21 PM |
| Explain what you need in a bit more detail and I'll work something up for you. |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Feb 2013 05:35 PM |
RoofNames = {"Roof"; "Chimney"; "Blarg"} -- Add more names, these are the "roof" parts. Just add there name to the list.
script.Parent.ClickDetector.MouseClick:connect(function() for i,v in pairs(RoofNames) do if Game.Workspace[v].Transparency == true then Game.Workspace[v].Transparency = false else Game.Workspace[v].Transparency = true end end end)
~~Advanced Scripter |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Feb 2013 05:42 PM |
| Beat me to it. This should work for you OP. Thanks for helping him out, cody! |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Feb 2013 05:44 PM |
script.Parent.ClickDetector.MouseClick:connect(function() for i = 1, 19 do if Game.Workspace["Roof"..i].Transparency == true then Game.Workspace["Roof"..i].Transparency = false else Game.Workspace["Roof"..i].Transparency = true end end end)
~~Advanced Scripter |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Feb 2013 05:47 PM |
Are you sure there is a ClickDetector inside the script's parent?
~~Advanced Scripter |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Feb 2013 05:49 PM |
Are the bricks inside of Workspace, or a model? If they are in a model, please clarify where the model is:
Game.Workspace.Car.Roof.Roof(10-19)
~~Advanced Scripter |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Feb 2013 05:58 PM |
Put this script inside the roof, where all the roof parts are.
Clicker = "Roofblahblah" -- Change this to the roof you want to be clicked
script.Parent[Clicker].ClickDetector.MouseClick:connect(function() for i = 1, 19 do if script.Parent["Roof"..i].Transparency == true then script.Parent["Roof"..i].Transparency = false else script.Parent["Roof"..i].Transparency = true end end end)
~~Advanced Scripter |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 08 Feb 2013 06:11 PM |
Transparency is not a boolean. . .
¤ ¤ † K M <( •д• )> X D † ¤ ¤ |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2013 06:14 PM |
Wow, I can't believe I missed that. .-.
Clicker = "Roofblahblah" -- Change this to the roof you want to be clicked script.Parent[Clicker].ClickDetector.MouseClick:connect(function() for i = 1, 19 do if script.Parent["Roof"..i].Transparency == 1 and i ~= 2 then script.Parent["Roof"..i].Transparency = 0 elseif script.Parent["Roof"..i].Transparency == 0 and i ~= 2 then script.Parent["Roof"..i].Transparency = 1 else script.Parent["Roof"..i].Transparency = .5 -- Not sure what you're wanting. end end end)
~~Advanced Scripter |
|
|
| Report Abuse |
|
|
| |
|
| |
|