I don’t know what’s wrong.

local TS = game:GetService "TweenService"
local Value = script.Parent.Value
local Button = script.Parent.Buttons.Door.Mouse
local Main = script.Parent.Main
local ClosedPos = script.Parent.Closed.CFrame
local OpenPos = script.Parent.Open.CFrame
local Tween_Info = TweenInfo.new ( .5, Enum.EasingStyle.Linear, Enum.EasingDirection.In )
local Close = TS:Create( Main, Tween_Info, { CFrame = ClosedPos } )
local Open = TS:Create( Main, Tween_Info, { CFrame = OpenPos } )
Button.MouseClick:Connect(function()
if Value.Value then
Open:Play()
Value.Value = false
else
Close:Play()
Value.Value = true
end
end)
Before you ask, MaxActivationDistance = 32 and the ClickDetectors values are set to default and I don’t have any binds to ContextActionService. I don’t want to use ProximityPrompts either.
What is the problem?