Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I am having problems?

I wrote this script:

Door1 = game.Workspace.Structure.Door.Left
Door2 = game.Workspace.Structure.Door.Right
t = false

function onTouch(hit)
	if t == false then
		t = true
		for i=1,20 do
			Door1.Lock3.CFrame = Door1.Lock3.CFrame + CFrame.new(0,1,0)
			Door2.Lock4.CFrame = Door2.Lock4.CFrame + CFrame.new(0,-1,0)
			wait()
		end
		wait(10)
		for i=1,20 do
			Door1.Lock3.CFrame = Door1.Lock3.CFrame - CFrame.new(0,1,0)
			Door2.Lock4.CFrame = Door2.Lock4.CFrame - CFrame.new(0,-1,0)
			wait()
		end
		t = false
	end
end

script.Parent.Touched:connect(onTouch)

Then appears this message: Lock 3 is not a valid member of Part.

6 comments

0

Check the part, make sure there isn't a typo.

0

What part?

0

The Door1

0

And what is Lock3?

0

Maybe do :WaitForChild("Lock3")

0

It's your script, you should know what Lock3 is

2 answers

Lock3 does not exist. That is your problem.

1 comment

0

What I can replace it for?

Can you please provide the full output error? Secondly, What are you trying to do?

This discussion is preserved as it was. New answers, comments, and votes are closed.