So I am making a door that if you push a button a door will open up. One door will open, but the other one won't. The error I got was " 18:55:09.277 - Workspace.YES.Script:9: attempt to index nil with 'CFrame' "
here's my code:
local door_a = game.Workspace:WaitForChild("DOOR_A") local door_b = game.Workspace:WaitForChild("DOOR_B") local click = script.Parent:WaitForChild("ClickDetector") local example_a = game.Workspace:WaitForChild("EXAMPLE_A") local example_b game.Workspace:WaitForChild("EXAMPLE_B") local ts = game:GetService("TweenService") click.MouseClick:Connect(function(player) ts:Create(door_a,TweenInfo.new(.5,Enum.EasingStyle.Sine),{CFrame = example_a.CFrame}):Play() ts:Create(door_b,TweenInfo.new(.5,Enum.EasingStyle.Sine),{CFrame = example_b.CFrame}):Play() end)