This should have an easy answer, I do this kind of functions all the time, I don't know why this isn't working!!
script.Parent is a TextButton, so that's not the problem. The only problem is with the function, nothing inside, it doesn't detect the click. I hope you can find a solution.
function a() local plr = game.Players.LocalPlayer if plr:GetRankInGroup(2990423)>= 3 then if script.Parent.Parent.Playing.Value == false then script.Parent.Parent.Playing.Value = true script.Parent.Announcement:Play() elseif script.Parent.Parent.Playing.Value == true then script.Parent.Parent.Playing.Value = false script.Parent.Announcement:Stop() end end end script.Parent.MouseButton1Click:connect(a)