KodakKid3
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 2860 |
|
|
| 03 Mar 2014 08:37 AM |
There's a platform with multiple parts. If you touch one, this happens:
function onTech(Hit) if not debounce then debounce = true for I = .5,0,-0.01 do script.Parent.Transparency = I wait(0.05) end debounce = false end end
script.Parent.Touched:connect(onTech)
I'd want it to be though, if you touch one, the script applies to all the parts of a model (script.Parent.Parent.(all children) |
|
|
| Report Abuse |
|
|
|
| 03 Mar 2014 09:57 AM |
| use some sort of for loop to search for all children of script.Parent.Parent |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 03 Mar 2014 10:02 AM |
There's a platform with multiple parts. If you touch one, this happens:
function onTech(Hit) if not debounce then debounce = true for I = .5,0,-0.01 do script.Parent.Transparency = I -- Do you still want this part? for _,v in pairs(script.Parent.Parent:GetChildren()) do if v:IsA'BasePart' then v.Transparency = I end end wait(0.05) end debounce = false end end
script.Parent.Touched:connect(onTech)
|
|
|
| Report Abuse |
|
|
KodakKid3
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 2860 |
|
| |
|