Global Announcement Command In Cmdr Panel

  1. What do you want to achieve?
    Make my Global Announcement System actually announce to all Servers.
  2. What is the issue?
    Im not sure what to use to make it work as MessagingService is not working for me.
  3. What solutions have you tried so far?
    I have tried Using messagingService and all the things i can try in forum, youtube,etc but did not work. I’m gonna leave the scripts down below for you to help, Thank you!
    Name is: “globalannounce”
    Type is: module script
    Location is: ServerScriptService.CmdrFolder.Commands.globalannounce
return {
	Name = "globalannounce";
	Aliases = {"ga"};
	Description = "A message to announce to every server(globally)";
	Group = "DefaultAdmin";
	Args = {
		{
			Type = "string";
			Name = "message";
			Description = "The message to announce";
		},
	};
}

name is: “globalannounceServer”
type is: module script
location is: ServerScriptService.CmdrFolder.Commands.globalannounceServer

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local AnnouncementDisplayer = ReplicatedStorage:WaitForChild("AnnouncementDisplayer")

return function(context, message)
    AnnouncementDisplayer:FireAllClients({
        Name = context.Executor.Name,
        UserId = context.Executor.UserId,
        Content = message
    })
end

Probably we have to modify the above script but i failed.
name: “announce”
type: localscript
location: starterplayerscripts.announce

-- LocalScript inside StarterPlayerScripts or StarterGui

local TweenService = game:GetService("TweenService")
local AnnouncementDisplayer = game.ReplicatedStorage:WaitForChild("AnnouncementDisplayer")

local AnnouncementTimeout = 5       -- Time each announcement lasts
local MaxAnnouncements = 10         -- Max stacked announcements at once
local AnnouncementSpacing = 6       -- Space between announcements

local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

-- ==== CREATE GUI PROGRAMMATICALLY ====
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "AnnouncementsGui"
screenGui.ResetOnSpawn = false
screenGui.Parent = playerGui

local container = Instance.new("Frame")
container.Name = "AnnouncementContainer"
container.BackgroundTransparency = 1
container.AnchorPoint = Vector2.new(0.5, 0)
container.Position = UDim2.new(0.5, 0, 0.05, 0)
container.Size = UDim2.new(0, 400, 1, 0)
container.Parent = screenGui

local template = Instance.new("TextLabel")
template.Name = "AnnouncementTemplate"
template.Size = UDim2.new(1, 0, 0, 30)
template.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
template.BackgroundTransparency = 0.2
template.TextColor3 = Color3.new(1, 1, 1)
template.Font = Enum.Font.GothamBold
template.TextScaled = true
template.Visible = false
template.Parent = container

local Uicorner = Instance.new("UICorner")
Uicorner.Parent = template

local UIPadding = Instance.new("UIPadding")
UIPadding.PaddingTop = UDim.new(0, 2)
UIPadding.PaddingBottom = UDim.new(0, 2)
UIPadding.Parent = template

-- Track active announcements
local activeAnnouncements = {}

local function repositionAnnouncements()
	for i, label in ipairs(activeAnnouncements) do
		local targetY = (i - 1) * (label.Size.Y.Offset + AnnouncementSpacing)
		TweenService:Create(label, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
			Position = UDim2.new(0, 0, 0, targetY)
		}):Play()
	end
end

local function createAnnouncement(text)
	-- Remove oldest if we exceed max
	if #activeAnnouncements >= MaxAnnouncements then
		local oldest = table.remove(activeAnnouncements, 1)
		oldest:Destroy()
	end

	local newLabel = template:Clone()
	newLabel.Visible = true
	newLabel.TextTransparency = 1
	newLabel.BackgroundTransparency = 1
	newLabel.Text = text
	newLabel.Parent = container
	newLabel.Position = UDim2.new(0, 0, 0, container.AbsoluteSize.Y)

	table.insert(activeAnnouncements, newLabel)
	repositionAnnouncements()

	-- Fade in
	TweenService:Create(newLabel, TweenInfo.new(0.3), {
		TextTransparency = 0,
		BackgroundTransparency = 0.2
	}):Play()

	-- Auto remove after timeout
	task.delay(AnnouncementTimeout, function()
		for i, lbl in ipairs(activeAnnouncements) do
			if lbl == newLabel then
				local fadeTween = TweenService:Create(lbl, TweenInfo.new(0.3), {
					TextTransparency = 1,
					BackgroundTransparency = 1
				})
				fadeTween:Play()
				fadeTween.Completed:Wait()
				lbl:Destroy()
				table.remove(activeAnnouncements, i)
				repositionAnnouncements()
				break
			end
		end
	end)
end

-- Listen for server announcements
AnnouncementDisplayer.OnClientEvent:Connect(function(data)
	local displayName = (data.UserId == 3908064382) and (data.Name .. " ✓") or data.Name
	createAnnouncement(displayName .. ": " .. data.Content)
end)

These are the components for the command.
Any help will be appreciated, Thank you!

You have to use messaging service to make this work, the only other method is basically making your own messaging service outside of Roblox studio. And I don’t see messaging services in any of the scripts you have provided.

It’s an array of arguments. (Commands can typically have more then one argument in most cli.)

Anyways for @rip_noob15313 ;

Roblox has some decent tutorials already which should provide you enough information on how to implement it with your current solution: Cross-server messaging | Documentation - Roblox Creator Hub

Oh sorry I didn’t notice that, thank you for telling me.

So i use messaging service:subscribeAsync?

Nvm. I figured it out thanks, I used the MS(MessagingService):PublishAsync and MS:SubscribeAsync, with the help of a local script and server script, i made my command, Thank you.