Hello i am trying to make a game where you have to switch levers to get thru obstacles but i want other levers to close when i open a lever.
so i just need to know how can i get all the other levers that is not clicked at the time
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
while task.wait() do
local Switchs = game.Workspace.Switchables:GetChildren()
for i,v in pairs(Switchs) do
if Mouse.Target == v then
print("Showing")
end
v.ClickDetector.MouseClick:Connect(function(Switch)
local Traps = v:GetChildren()
for i,v in pairs(Traps) do
if v:IsA("BasePart") then
v.Transparency = 1
v.CanCollide = false
end
end
end)
end
end