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

How do I make a lever script to open a curtain?

Asked by 4 years ago
Edited 4 years ago

For real, I had trouble with this. Can anyone help me make a lever script? I'm not sure how to do it.. It's supposed to open a curtain.

01--On Script
02script.Parent.ClickDetector.MouseClick:Connect(function()
03    Lever1 = script.Parent.Parent.Lever1
04    Lever1B = script.Parent
05    Blink = script.Parent.Parent.Blink
06    Curtain = game.Workspace.Curtain
07    Lever1.Orientation = Vector3.new(0, -90, -30)
08    Lever1.Position = Vector3.new(160.664, 13.88, 21.692)
09    Lever1B.Position = Vector3.new(160.664, 14.223, 21.212)
10    Blink.BrickColor = BrickColor.new("Lime green")
11    Curtain.Transparency = 0
12end)
13 
14--Off script
15script.Parent.ClickDetector.MouseClick(function()
View all 24 lines...

Could anyone show me a script using these? (Also, when tested it only activates the on script. )

0
Do you get an error running this script? rabbi99 714 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago
1script.Parent.ClickDetector.MouseClick(function()
2--which it needs to be
3Connect(function()

I make the same errors all the time lol

0
Oh thanks for noticing that but this isn't what I wanted Dragonboy99711 5 — 4y
0
oh ok DevvUnknown 3 — 4y
Ad

Answer this question