I made sliding glass doors using CFframe+Vector3 line, its activated using a .touched:connect(Function) but the problem im having is when touching the part the script isnt following thru, the door is just FLYING to the other side of the map.
function DoorTouch(hit)
for I=1,20 do
wait(.2)
script.Parent.CFrame=script.Parent.CFrame+Vector3.new(.3,0,0)
end
wait(4)
for I=1,20 do
wait(.2)
script.Parent.CFrame=script.Parent.CFrame+Vector3.new(-.3,0,0)
end
end
game.Workspace.DoorSensor.Touched:connect(DoorTouch)

5 comments
I'm trying to get the door to open and close at the touch of the door sensor (Part is collide = false, invisible and almost CFramed into the ground)
Is the door anchored?
Yes the door is anchored I'll see if I cant post more info.
first of all, if you are using Touched function, always consider adding in a debounce since the Touch Event fires numerous times per second.
you should detect if the object that touched it is a humanoid if it's supposed to be touched by a player to open.