So I want a door that is activated by a lever opens slow then when going through the door starts to close slow. I have a "Part" for the door/ "Part" for the trigger/ A model for the lever. How would you do this?
Thats the lever script..
local isOn = true
function on()
isOn = true
script.Parent.Pull.Transparency = 0
script.Parent.Pull.CanCollide = true
script.Parent.Pull2.Transparency = 1
script.Parent.Pull2.CanCollide = false
end
function off()
isOn = false
script.Parent.Pull.Transparency = 1
script.Parent.Pull.CanCollide = false
script.Parent.Pull2.Transparency = 0
script.Parent.Pull2.CanCollide = true
end
function onClicked()
if isOn == true then off() else on() end
end
script.Parent.Pull.ClickDetector.MouseClick:connect(onClicked)
script.Parent.Pull2.ClickDetector.MouseClick:connect(onClicked)
on()
after that how would I activate the door after clicking the lever. I don't want two parts to be transparent and visible. I want 1 part that uses a c frame script when the lever is clicked. from it touching the ground to moving about 15 studs up? then when you walk through for 5 studs the door closes because of a trigger that is located 5 studs from where the door is? PLEASE HELP MUCH APRECIATED I KNOW THIS IS RANDOM!
