I'm trying to make a door that has two buttons but only one button works.
local tweenService = game:GetService("TweenService") local clickDetector = workspace:WaitForChild("Lever").ClickDetector local seconds = 11.9 clickDetector.MouseClick:Connect(function() wait(2.7) script.Parent.Rumb:Play() tweenService:Create(script.Parent, TweenInfo.new(seconds, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {CFrame = CFrame.new(-232.523, 75.247, -242.881)}):Play() wait(30) script.Parent.Rumb:Play() tweenService:Create(script.Parent, TweenInfo.new(seconds, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {CFrame = CFrame.new(-232.523, 75.247, -182.133)}):Play() end)
Thanks if you can help!
Not sure if this will work but rename one of the Levers Lever2.
local tweenService = game:GetService("TweenService") local clickDetector = workspace:WaitForChild("Lever").ClickDetector local clickDetector2 = workspace:WaitForChild("Lever2").ClickDetector local seconds = 11.9 clickDetector.MouseClick:Connect(function() wait(2.7) script.Parent.Rumb:Play() tweenService:Create(script.Parent, TweenInfo.new(seconds, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {CFrame = CFrame.new(-232.523, 75.247, -242.881)}):Play() wait(30) script.Parent.Rumb:Play() tweenService:Create(script.Parent, TweenInfo.new(seconds, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {CFrame = CFrame.new(-232.523, 75.247, -182.133)}):Play() end) clickDetector2.MouseClick:Connect(function() wait(2.7) script.Parent.Rumb:Play() tweenService:Create(script.Parent, TweenInfo.new(seconds, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {CFrame = CFrame.new(-232.523, 75.247, -242.881)}):Play() wait(30) script.Parent.Rumb:Play() tweenService:Create(script.Parent, TweenInfo.new(seconds, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {CFrame = CFrame.new(-232.523, 75.247, -182.133)}):Play() end)
Likely since you named it "Lever" if they have the same name only one of the children will work. Rename the second one "Lever2" and change the WaitForChild() to Lever2 and that should fix it I think.
Edit: For future reference use script.Parent....