Im making a opening and closing door for my game and it did not work so I checked my output and it said that here is the script.
local frame = script.Parent local openSound = frame:WaitForChild("DoorOpen") local closeSound = frame:WaitForChild("DoorClose") local clickDetector = frame:WaitForChild("ClickDetector") local model = frame.Parent local frameClose = model:WaitForChild("DoorFrameClose") local frameOpen = model:WaitForChild("DoorFrameOpen") local opened = model:WaitForChild("Opened") local tweenService = game:GetService("TweenService")
local debounce = true clickDetector.MouseClick:Connect(function() if debounce == true then debounce = false if opened.Value == true then opened.Value = false
closeSound:Play()
tweenService:Create(frame,TweenInfo.new(.35),{CFrame = frameClose.CFrame}):Play
else
opened.Value = true
openSound:Play()
tweenService:Create(frame,TweenInfo.new(.35),{CFrame = frameOpen.CFrame}):Play
end
wait(0.35)
debounce = true
end
end)

1 comment
maybe cause of that :Play in line 2 and 7