Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I am having problems?

Asked by 10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

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.

0
Check the part, make sure there isn't a typo. Tempestatem 884 — 10y
0
What part? StickMasterNinja2 0 — 10y
0
The Door1 Tempestatem 884 — 10y
0
And what is Lock3? StickMasterNinja2 0 — 10y
View all comments (2 more)
0
Maybe do :WaitForChild("Lock3") IntellectualBeing 430 — 10y
0
It's your script, you should know what Lock3 is Tempestatem 884 — 10y

2 answers

Log in to vote
0
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
10 years ago

Lock3 does not exist. That is your problem.

0
What I can replace it for? StickMasterNinja2 0 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

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

Answer this question