Here is the code. Pls respond ASAP!!
local door = script.Parent.Door
local function openelevator () door.CanCollide = false door.Transparency = .5 door.BrickColor = BrickColor.new ("Bright green") end
local function closeelevator () door.CanCollide = true door.Transparency = 0 door.BrickColor = BrickColor.new ("Black") end
while true do openelevator() wait (3) closeelevator() end
On your while true do loop, it opens the elevator doors then it waits 3 seconds and then closes the doors and then instantly opens them. This is probably happening so fast that you don't see it actually closing. This is the fixed version.
local door = script.Parent.Door local function openelevator() door.CanCollide = false door.Transparency = .5 door.BrickColor = BrickColor.new("Bright green") end local function closeelevator() door.CanCollide = true door.Transparency = 0 door.BrickColor = BrickColor.new("Black") end while true do openelevator() wait(3) -- Time to wait until doors close closeelevator() wait(2) -- Time to wait for doors to open end