for i = 0.001, 0.1, 0.001 do game.Workspace.Door.CFrame = game.Workspace.Door.CFrame * CFrame.new(Vector3.new(0,0.1,0)) wait() end end wait(5) for i = 0.001, 0.1, 0.001 do game.Workspace.Door.CFrame = game.Workspace.Door.CFrame * CFrame.new(Vector3.new(0,-0.1,0)) end
So everything works until the door should go back, it just teleports back to the first position without any animation. Does anyone know why this happens?
Thanks for the help, Xsodar
I would suggest using Roblox's Tween service, it makes things easier and smooth!
Either way, you forgot to add wait()
in your last for loop, so the door instantly moves back to the original position.