mattkabag
|
  |
| Joined: 13 Dec 2008 |
| Total Posts: 3156 |
|
|
| 09 Aug 2014 12:11 AM |
opening = script.Parent.Open.ClickDetector.MouseClick closing = script.Parent.Close.ClickDetector.MouseClick
a = script.Parent.Part1.script.Parent.Part2.script.Parent.Part3.script.Parent.Part4.script.Parent.Part5.script.Parent.Part6script.Parent.Part7.script.Parent.Part8.script.Parent.Part9.script.Parent.Part10
function Close() a.Transparency = 0.4 wait(0.1) a.Transparency = 0.3 wait(0.1) a.Transparency = 0.2 wait(0.1) a.Transparency = 0.1 wait(0.1) a.Transparency = 0 end function Open() a.Transparency = 0.1 wait(0.1) a.Transparency = 0.2 wait(0.1) a.Transparency = 0.3 wait(0.1) a.Transparency = 0.4 wait(0.1) a.Transparency = 0.5 end closing:connect(Close) opening:connect(Open)
|
|
|
| Report Abuse |
|
|
|
| 09 Aug 2014 12:27 AM |
well
a = script.Parent.Part1.script.Parent.Part2.script.Parent.Part3.script.Parent.Part4.script.Parent.Part5.script.Parent.Part6script.Parent.Part7.script.Parent.Part8.script.Parent.Part9.script.Parent.Part10
makes no sense to the script so it says "a is nil". |
|
|
| Report Abuse |
|
|
mattkabag
|
  |
| Joined: 13 Dec 2008 |
| Total Posts: 3156 |
|
|
| 09 Aug 2014 12:34 AM |
ok so would i put: script.Parent.Model.GetChildren or script.Parent.Model.Children |
|
|
| Report Abuse |
|
|
mattkabag
|
  |
| Joined: 13 Dec 2008 |
| Total Posts: 3156 |
|
|
| 09 Aug 2014 12:42 AM |
I tried
opening = script.Parent.Open.ClickDetector.MouseClick closing = script.Parent.Close.ClickDetector.MouseClick
a = {"Part1", "Part2", "Part3", "Part4", "Part5", "Part6", "Part7", "Part8", "Part9", "Part10"}
Still didn't work, I also tried:
a = script.Parent.Model.Children
didnt work as well :(( |
|
|
| Report Abuse |
|
|
Fidgeting
|
  |
| Joined: 08 Feb 2014 |
| Total Posts: 1193 |
|
| |
|
mattkabag
|
  |
| Joined: 13 Dec 2008 |
| Total Posts: 3156 |
|
|
| 09 Aug 2014 12:54 AM |
still didnt work, and ik the script works because when i do:
script.Parent.Model.Part1
it works but only on one of the bricks |
|
|
| Report Abuse |
|
|
mattkabag
|
  |
| Joined: 13 Dec 2008 |
| Total Posts: 3156 |
|
| |
|
ehern11
|
  |
| Joined: 23 Apr 2011 |
| Total Posts: 1541 |
|
|
| 09 Aug 2014 01:20 AM |
function close() for _,v in pairs(script.Parent.Model:GetChildren()) do for i = 0.5,0,-0.1 do v.Transparency = i end end
function open() for _,v in pairs(script.Parent.Model:GetChildren()) do for i = 0,0.5,0.1 do v.Transparency = i end end |
|
|
| Report Abuse |
|
|
mattkabag
|
  |
| Joined: 13 Dec 2008 |
| Total Posts: 3156 |
|
|
| 09 Aug 2014 02:24 AM |
so i did this
opening = script.Parent.Open.ClickDetector.MouseClick closing = script.Parent.Close.ClickDetector.MouseClick
function close() for _,v in pairs(script.Parent.Model:GetChildren()) do for i = 0.5,0,-0.1 do v.Transparency = i end end
function open() for _,v in pairs(script.Parent.Model:GetChildren()) do for i = 0,0.5,0.1 do v.Transparency = i end end end end
closing:connect(Close) opening:connect(Open)
still didnt work |
|
|
| Report Abuse |
|
|
mattkabag
|
  |
| Joined: 13 Dec 2008 |
| Total Posts: 3156 |
|
| |
|
ehern11
|
  |
| Joined: 23 Apr 2011 |
| Total Posts: 1541 |
|
| |
|