Door Script broke after most recent ROBLOX update

All my doors use this script, and all of them, in loads of different places and models, have broken after the most recent update. The only update to the place itself has been fixing some bricks with the wrong material, nothing else has changed for weeks.

local dir        =  Vector3.new(0,0,-1) --direction of model motion from its initial starting point to end point
		dir        =  dir.unit
local override   =  true --allows buttons to change action before it is completed (i.e. close it before it completely opens/ open before completely closing)
local offset     =  8 -- how far the door moves in dir !Always positive!
local speed      =  1.5 --studs per second, thats about 1.65 mi/hour !Always positive!
local closetime  =  6 -- if you want the door to close automatically set it to the number of nonzero seconds after it opens that it waits until starting to close

--Edit the above


local End        =  script.Parent:GetModelCFrame().p + dir * offset
local Start      =  script.Parent:GetModelCFrame().p
local parts      =  script.Parent:GetChildren()
local dist       =  End - Start
local status     =  "closed" 
local db         =  true

override = (closetime <= 0) and override


for _, v in pairs(parts) do
	if not v:IsA("BasePart") then
		table.remove(parts, _)
	else
		parts[_] = {v, closed = v.CFrame, open = v.CFrame + offset * dir}
	end
end

function Update()

	if not override and not db then return end
	db = false -- has no effect if override is true

	status      =  status == "closed" and "open" or "closed"
	local pos   =  status == "closed" and Start or End
	local ndir  =  pos == End and -1 or 1
	
	local travel = (pos - script.Parent:GetModelCFrame().p).magnitude
	local oldstate = status
	
	while travel > 0 and status == oldstate do
		local os  =  not os and oldstate or os
		travel    =  travel - speed * wait()
		travel    =  travel<0 and 0 or travel
		for _, v in pairs(parts) do
			v[1].CFrame = v[1].CFrame - v[1].CFrame.p + v[os].p + travel * ndir * dir
		end
		print(travel == 0 and closetime > 0, closetime > 0)
		if travel == 0 and closetime > 0 and status == "open" then
			wait(closetime)
			status    =  status == "closed" and "open" or "closed"
			pos       =  status == "closed" and Start or End
			ndir      =  pos == End and -1 or 1
			travel    = (pos - script.Parent:GetModelCFrame().p).magnitude
			oldstate  =  status
			os        =  status
		end
	end
	db = true
end

script.Parent.Parent.Button.ClickDetector.MouseClick:connect(Update)

:46: Attempt to index field ‘?’ (a nil value)
Line 46:
v[1].CFrame = v[1].CFrame - v[1].CFrame.p + v[os].p + travel * ndir * dir

First angry message:
2/13/2014 7:24:31 AM

So that’s why this door didn’t work.

Before that line do

print(v[1], v.open, v.closed)

And tell us what happens

Wedge -34.9269981, 51.4000092, 6.74998999, -0.999994636, -8.78432933e-014, 1.19738559e-007, -2.32083057e-017, 0.999994874, -3.57627101e-007, -5.29780664e-010, -3.57625737e-007, -0.999991059 -34.9269981, 51.4000092, 1.74999011, -0.999994636, -8.78432933e-014, 1.19738559e-007, -2.32083057e-017, 0.999994874, -3.57627101e-007, -5.29780664e-010, -3.57625737e-007, -0.999991059
18:27:42.806 - Workspace.Door.Door.DoorOpen:48: attempt to index field ‘?’ (a nil value)
18:27:42.807 - Script ‘Workspace.Door.Door.DoorOpen’, Line 48
18:27:42.808 - stack end

I don’t understand why you are posting this in bug reports without properly debugging it for yourself. You need to narrow down the specific problem before you post here.

We can’t debug the script ourselves because you did not provide the full model.

Either v[os] is nil, or v[os].p is nil.

I can’t debug it because I didn’t make it and the guy who did doesn’t play anymore. Plus, as I said, it has been working for years and only broke after the recent ROBLOX update.

[quote] I don’t understand why you are posting this in bug reports without properly debugging it for yourself. You need to narrow down the specific problem before you post here.

We can’t debug the script ourselves because you did not provide the full model.

Either v[os] is nil, or v[os].p is nil. [/quote]

I can’t debug it because I didn’t make it and the guy who did doesn’t play anymore. Plus, as I said, it has been working for years and only broke after the recent ROBLOX update.[/quote]
You have the model, don’t you?

[quote] [quote=“Merely” post=20287]I don’t understand why you are posting this in bug reports without properly debugging it for yourself. You need to narrow down the specific problem before you post here.

We can’t debug the script ourselves because you did not provide the full model.

Either v[os] is nil, or v[os].p is nil. [/quote]

I can’t debug it because I didn’t make it and the guy who did doesn’t play anymore. Plus, as I said, it has been working for years and only broke after the recent ROBLOX update.[/quote]
You have the model, don’t you?[/quote]

Sure, I’ll send it in a moment.

Here.

[quote] I don’t understand why you are posting this in bug reports without properly debugging it for yourself. You need to narrow down the specific problem before you post here.

We can’t debug the script ourselves because you did not provide the full model.

Either v[os] is nil, or v[os].p is nil. [/quote]

I can’t debug it because I didn’t make it and the guy who did doesn’t play anymore. Plus, as I said, it has been working for years and only broke after the recent ROBLOX update.[/quote]

I always thought you are a scripter. Oh ok.

Accidentally thanked, oh well.

I’ll take a look at it.

[quote] [quote=“Merely” post=20287]I don’t understand why you are posting this in bug reports without properly debugging it for yourself. You need to narrow down the specific problem before you post here.

We can’t debug the script ourselves because you did not provide the full model.

Either v[os] is nil, or v[os].p is nil. [/quote]

I can’t debug it because I didn’t make it and the guy who did doesn’t play anymore. Plus, as I said, it has been working for years and only broke after the recent ROBLOX update.[/quote]

I always thought you are a scripter. Oh ok.[/quote]

I do script, but not that. Only two things in the labs aren’t scripted by me, the gun and the doors, and both are now broken. I have some more advanced stuff but it’s all little more than a tech demo.

That attachment is giving me a 404.

Well, Im outta ideas then.

Well, Im outta ideas then.[/quote]
Put it on dropbox or puu.sh or similar.

Well, Im outta ideas then.[/quote]
Put it on dropbox or puu.sh or similar.[/quote]

I’ll just create a new door script. I’m sure that one was needlessly complicated anyway.

Well, Im outta ideas then.[/quote]

Post it here [url]Dropbox - No Access - Simplify your life