|
| 29 Aug 2011 06:19 AM |
Hi I am building a new type of door. Basically it is a button door with vip lazors. The door is working perfectly but one setting isnt working halfway. When you press the open button the first door gets cancolide turned off and the transparency goes to .5, but on the secong door the transparecy stays the same. But I want the transparency for the second door to go down also. I used this scrip on both doors changing only the parent of the button in each script so it would work with two doors: function onClicked() script.Parent.Parent.Door.Transparency=0.5 script.Parent.Parent.Secondary.CanCollide= false end script.Parent.ClickDetector.MouseClick:connect(onClicked) (The close button works perfectly so Im not including the script) Plz help me I really want my new door to be a success! THX ~TheBoss2213 |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2011 06:51 AM |
function onClicked() script.Parent.Parent.Door.Transparency=0.5 script.Parent.Parent.Secondary.CanCollide= false script.Parent.Parent.Secondary.Transparency=0.5 script.Parent.Parent.Door.CanCollide= false end script.Parent.ClickDetector.MouseClick:connect(onClicked)
I don't know what you mean with CanCollide off but i think this should work? |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2011 06:55 AM |
Stupid forum posts...
script.Parent.Parent.Door.Transparency=0.5
script.Parent.Parent.Secondary.CanCollide= false
script.Parent.Parent.Secondary.Transparency=0.5
script.Parent.Parent.Door.CanCollide= false
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
But i don't get what you mean with vip lazers?
|
|
|
| Report Abuse |
|
|
|
| 29 Aug 2011 03:12 PM |
| Thx I will try it out :D btw the vip lazors are a separate script that I wrote. |
|
|
| Report Abuse |
|
|