function onTouched(part) game.Workspace.Door.DL.Vector3.new = ( 14, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 13.9, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 13.8, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 13.7, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 13.6, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 13.5, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 13.4, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 13.3, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 13.2, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 13.1, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 13, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 12.9, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 12.8, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 12.7, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 12.6, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 12.5, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 12.4, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 12.3, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 12.2, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 12.1, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 12, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 11.9, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 11.8, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 11.7, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 11.6, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 11.5, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 11.4, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 11.3, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 11.2, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 11.1, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 11, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 10.9, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 10.8, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 10.7, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 10.6, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 10.5, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 10.4, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 10.3, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 10.2, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 10.1, 0.2, 15.4 ) wait(.1) game.Workspace.Door.DL.Vector3.new = ( 10, 0.2, 15.4 ) end --// In the future, please put your code in a code block. All you have to do is click the blue button in edit mode, and put your code between the lines.
To set a size, position, or rotation, you would use a Vector3 like so,
part.Position = Vector3.new(1,2,3)
So, that's great.
To do this, we use a for loop. Like so,
function onTouched(part) for i = 0,4,0.1 do game.Workspace.Door.DL.Position = Vector3.new(14-i, 0.2, 15.4) wait(.1) end end
You forgot to call you function as well.
-- Regular script in part that's in workspace function onTouched(part) for i = 0,4,0.1 do game.Workspace.Door.DL.Position = Vector3.new(14-i, 0.2, 15.4) wait(.1) end end script.Parent.Touched:connect(onTouched)
Good Luck!
You have to connect the function to the Touched event, for example
script.Parent.Touched:connect(onTouched)
This is why your script isn't working.