local sirenOn = game.Workspace.SirenOn
local sirenOff = game.Workspace.SirenOff
local lockDown = game.Workspace.LockDown
local alarm = game.Workspace.Alarm
while wait(0.2) do
if lockDown.Status.Value == true then
print("yeet")
sirenOff.ClickDetector.MouseClick:Connect(StopSiren)
print("function called")
sirenOn.ClickDetector.MouseClick:Connect(PlaySiren)
end
end
function PlaySiren()
alarm.Sound:Play()
end
function StopSiren()
alarm.Sound:Stop()
end
Error: 21:12:26.685 - Attempt to connect failed: Passed value is not a function

1 comment
Try putting the functions before you call them, like physically place them above the while loop.