I have this script to run pumps but after it runs the first time and tries to turn it on again it gives this message: "12:18:03.658 - Workspace.Pumps.Clickyboi.Script:8: attempt to index upvalue 'isiton' (a boolean value)" I have tried numerous times to try to fix this issue but it just keeps appearing.
local access = script.Parent.Parent local pump1 = access.Pump1.Housing local pump2 = access.Pump2.Housing local isiton = true local canbeactivated = true script.Parent.ClickDetector.MouseClick:connect(function(TRIGGERED) if isiton.Value == false and canbeactivated == true then isiton = true canbeactivated = false pump1.On:Play() wait(3) pump2.On:Play() wait(3) pump1.Running:Play() wait(3) pump2.Running:Play() wait(3) canbeactivated = true end end) script.Parent.ClickDetector.MouseClick:connect(function(LOL) if isiton.Value == true and canbeactivated == true then isiton = false pump1.Shutdown:Play() pump2.Shutdown:Play() pump1.Running:Stop() pump2.Running:Stop() wait(10) canbeactivated = true end end)