ClickDetector straight up not working

I don’t know what’s wrong.
problem

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?

Is CanQuery on for the baseparts holding the clickdetectors?

try removing the .Value after the Value after mouseclick connect function

I do not believe it is on, I set all the physics and events for parts false because the player will never touch them.

ClickDetectors will not work unless you enable CanQuery, enable them and it should work.

1 Like

I appreciate your help, I will look into CanQuery for a bit.