This script is supposed to fire the sendAnnouncement remote and receive it on the players screen, while making sure that rank 11 and above can only use it.
game.ReplicatedStorage.sendAnnouncement.OnServerEvent:Connect(function(player, msg)
local rank = player:GetRankInGroup(9178694)
if rank >= 11 then
messaging:PublishAsync("Announcements")
else
warn("Your rank is not high enough to publish announcements!")
end
end)