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.
--On Script script.Parent.ClickDetector.MouseClick:Connect(function() Lever1 = script.Parent.Parent.Lever1 Lever1B = script.Parent Blink = script.Parent.Parent.Blink Curtain = game.Workspace.Curtain Lever1.Orientation = Vector3.new(0, -90, -30) Lever1.Position = Vector3.new(160.664, 13.88, 21.692) Lever1B.Position = Vector3.new(160.664, 14.223, 21.212) Blink.BrickColor = BrickColor.new("Lime green") Curtain.Transparency = 0 end) --Off script script.Parent.ClickDetector.MouseClick(function() Lever1 = script.Parent.Parent.Lever1 Lever1B = script.Parent Blink = script.Parent.Parent.Blink Curtain = game.Workspace.Curtain Lever1.Orientation = Vector3.new(0, -90, 45) Lever1B.Position = Vector3.new(160.664, 12.853, 21.212) Blink.BrickColor = BrickColor.new("Really red") Curtain.Transparency = 1 end)
Could anyone show me a script using these? (Also, when tested it only activates the on script. )
script.Parent.ClickDetector.MouseClick(function() --which it needs to be Connect(function()
I make the same errors all the time lol