|
| 30 Jul 2011 06:24 PM |
What I have is a model called model, in it is Gate1,Gate2,and Entrance. Entrance is a stack of blocks, from bottom to top named part1-12. Gate1 and 2 have in them Path1 and Path2. They each have a script called Script. Heres the script in 1, they have opposite names in the two paths. Path1 has this script, path 2 has the same script, but where it says path2, it says path 1.
function onTouched()
script.Parent.Parent.Parent.Gate2.Path2.Script.Disabled = true script.Parent.Parent.Parent.Entrance.Part1.Transparency = 1 script.Parent.Parent.Parent.Entrance.Part1.CanCollide = false wait(.08) script.Parent.Parent.Parent.Entrance.Part2.Transparency = 1 script.Parent.Parent.Parent.Entrance.Part2.CanCollide = false wait(.08) script.Parent.Parent.Parent.Entrance.Part3.Transparency = 1 script.Parent.Parent.Parent.Entrance.Part3.CanCollide = false wait(.08) script.Parent.Parent.Parent.Entrance.Part4.Transparency = 1 script.Parent.Parent.Parent.Entrance.Part4.CanCollide = false wait(.08) script.Parent.Parent.Parent.Entrance.Part5.Transparency = 1 script.Parent.Parent.Parent.Entrance.Part5.CanCollide = false wait(.08) script.Parent.Parent.Parent.Entrance.Part6.Transparency = 1 script.Parent.Parent.Parent.Entrance.Part6.CanCollide = false wait(.08) script.Parent.Parent.Parent.Entrance.Part7.Transparency = 1 script.Parent.Parent.Parent.Entrance.Part7.CanCollide = false wait(.08) script.Parent.Parent.Parent.Entrance.Part8.Transparency = 1 script.Parent.Parent.Parent.Entrance.Part8.CanCollide = false wait(.08) script.Parent.Parent.Parent.Entrance.Part9.Transparency = 1 script.Parent.Parent.Parent.Entrance.Part9.CanCollide = false wait(.08) script.Parent.Parent.Parent.Entrance.Part10.Transparency = 1 script.Parent.Parent.Parent.Entrance.Part10.CanCollide = false wait(.08) script.Parent.Parent.Parent.Entrance.Part11.Transparency = 1 script.Parent.Parent.Parent.Entrance.Part11.CanCollide = false wait(.08) script.Parent.Parent.Parent.Entrance.Part12.Transparency = 1 script.Parent.Parent.Parent.Entrance.Part12.CanCollide = false wait(1.5) script.Parent.Parent.Parent.Entrance.Part12.Transparency = 0 script.Parent.Parent.Parent.Entrance.Part12.CanCollide = true wait(.8) script.Parent.Parent.Parent.Entrance.Part11.Transparency = 0 script.Parent.Parent.Parent.Entrance.Part11.CanCollide = true wait(.8) script.Parent.Parent.Parent.Entrance.Part10.Transparency = 0 script.Parent.Parent.Parent.Entrance.Part10.CanCollide = true wait(.8) script.Parent.Parent.Parent.Entrance.Part9.Transparency = 0 script.Parent.Parent.Parent.Entrance.Part9.CanCollide = true wait(.8) script.Parent.Parent.Parent.Entrance.Part8.Transparency = 0 script.Parent.Parent.Parent.Entrance.Part8.CanCollide = true wait(.8) script.Parent.Parent.Parent.Entrance.Part7.Transparency = 0 script.Parent.Parent.Parent.Entrance.Part7.CanCollide = true wait(.8) script.Parent.Parent.Parent.Entrance.Part6.Transparency = 0 script.Parent.Parent.Parent.Entrance.Part6.CanCollide = true wait(.8) script.Parent.Parent.Parent.Entrance.Part5.Transparency = 0 script.Parent.Parent.Parent.Entrance.Part5.CanCollide = true wait(.8) script.Parent.Parent.Parent.Entrance.Part4.Transparency = 0 script.Parent.Parent.Parent.Entrance.Part4.CanCollide = true wait(.8) script.Parent.Parent.Parent.Entrance.Part3.Transparency = 0 script.Parent.Parent.Parent.Entrance.Part3.CanCollide = true wait(.8) script.Parent.Parent.Parent.Entrance.Part2.Transparency = 0 script.Parent.Parent.Parent.Entrance.Part2.CanCollide = true wait(.8) script.Parent.Parent.Parent.Entrance.Part1.Transparency = 0 script.Parent.Parent.Parent.Entrance.Part1.CanCollide = true script.Parent.Parent.Parent.Gate2.Path2.Script.Disabled = false
end
script.Parent.Touched:Connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 06:28 PM |
| it does nothing, i need help |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 06:34 PM |
function onTouched() script.Parent.Parent.Parent.Gate2.Path2.Script.Disabled = true for i = 1,12 do script.Parent.Parent.Parent.Entrance["Part"..i].Transparency = 1 script.Parent.Parent.Parent.Entrance["Part"..i].CanCollide = false wait(.08) for i = 12,1,-1 do wait(.8) script.Parent.Parent.Parent.Entrance.["Part"..i].Transparency = 0 script.Parent.Parent.Parent.Entrance.["Part"..i].CanCollide = true script.Parent.Parent.Parent.Gate2.Path2.Script.Disabled = false
end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Jul 2011 06:36 PM |
| late, what was wrong with mine>? im trying to learm |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 06:37 PM |
If mine worked, that is.
I shortened it (alot) and changed :Connect to :connect |
|
|
| Report Abuse |
|
|