So my lever always is running even though its supposed to be activated by a clickdetector and i dont know why. heres the code:
while true do
local Pos1 = script.Parent.LeverPos1
local Pos2 = script.Parent.LeverPos2
local Pos3 = script.Parent.LeverPos3
local Num1 = script.Parent.LeverPos1
local Num2 = script.Parent.LeverPos2
local Num3 = script.Parent.LeverPos3
if Pos1.ClickDetector.MouseClick or Num1.ClickDetector.MouseClick then
game:GetService("TweenService"):Create(script.Parent.Lever, TweenInfo.new(0.5), {Position = Vector3.new(-520.007, 655.144, 263.743)}):Play()
script.Parent.Lever.Sound:Play()
wait(1.2)
game:GetService("TweenService"):Create(workspace.Values.LaserValues.CoreLaser3, TweenInfo.new(0.5), {Value = 0.7}):Play()
end
if Pos2.ClickDetector.MouseClick or Num2.ClickDetector.MouseClick then
game:GetService("TweenService"):Create(script.Parent.Lever, TweenInfo.new(0.5), {Position = Vector3.new(-521.042, 655.871, 264.02)}):Play()
script.Parent.Lever.Sound:Play()
wait(1.2)
game:GetService("TweenService"):Create(workspace.Values.LaserValues.CoreLaser3, TweenInfo.new(0.5), {Value = 0.4}):Play()
end
if Pos3.ClickDetector.MouseClick or Num3.ClickDetector.MouseClick then
game:GetService("TweenService"):Create(script.Parent.Lever, TweenInfo.new(0.5), {Position = Vector3.new(-521.997, 656.542, 264.276)}):Play()
script.Parent.Lever.Sound:Play()
wait(1.2)
game:GetService("TweenService"):Create(workspace.Values.LaserValues.CoreLaser3, TweenInfo.new(0.5), {Value = 0}):Play()
end
task.wait()
end
Proof of issue:
Heres the explorer view of the lever:
