Help with :FireAllClient()

I am currently trying to make an announcement command for my admin, what I’m trying to do is when someone did :m it would do :FireAllClient and change the gui on a local script. But what I did here only shows for the person who did the command, can someone tell me why?

Server Script:

if cmd:lower() == prefix.."m" and level3 then
			if args[2] == nil or args[2] == "" then
				local gui = script.Parent.Guis.ErrGui:Clone()
				gui.ErrText.Text = "Incorrect Command Usage: "..prefix.."m <message>"
				gui.Parent = player.PlayerGui
				game:GetService("TweenService"):Create(player.PlayerGui.ErrGui.ErrText,, {TextTransparency = 0}):Play()
				game:GetService("TweenService"):Create(player.PlayerGui.ErrGui.ErrText,, {TextTransparency = 1}):Play()
			elseif level3 then
				local text = string.sub(msg, #cmd+1)
				local filtered = game.Chat:FilterStringAsync(text, player, player)
				local fulltext = filtered
				game.ReplicatedStorage.MACoreGui:FireAllClients(player, "AnnGui", fulltext)

Local Script:

game.ReplicatedStorage.MACoreGui.OnClientEvent:Connect(function(player, guiName, fulltext)
	local players = game.Players.LocalPlayer
	if guiName == "AnnGui" then
		if players.PlayerGui:WaitForChild(guiName).AnnFrame.Transparency == 1 then
			players.PlayerGui:WaitForChild(guiName).AnnFrame.Names.Text = player.Name
			player.PlayerGui:WaitForChild(guiName).AnnFrame.Icon.Image = game.Players:GetUserThumbnailAsync(player.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
			game:GetService("TweenService"):Create(players.PlayerGui:WaitForChild(guiName).AnnFrame,, {Transparency = 0.5}):Play()
			game:GetService("TweenService"):Create(players.PlayerGui:WaitForChild(guiName).AnnFrame.AnnText,, {BackgroundTransparency = 0.5}):Play()
			game:GetService("TweenService"):Create(players.PlayerGui:WaitForChild(guiName).AnnFrame.AnnText,, {TextTransparency = 0}):Play()
			game:GetService("TweenService"):Create(players.PlayerGui:WaitForChild(guiName).AnnFrame.Names,, {TextTransparency = 0}):Play()
			game:GetService("TweenService"):Create(players.PlayerGui:WaitForChild(guiName).AnnFrame.Title,, {TextTransparency = 0}):Play()
			game:GetService("TweenService"):Create(players.PlayerGui:WaitForChild(guiName).AnnFrame.Icon,, {ImageTransparency = 0}):Play()
			while wait() do
				for i = 1, #fulltext do
					players.PlayerGui:WaitForChild(guiName).AnnFrame.AnnText.Text = string.sub(fulltext,1,i)
				if player.PlayerGui:WaitForChild(guiName).AnnFrame.AnnText.Text == fulltext then
			game:GetService("TweenService"):Create(players.PlayerGui:WaitForChild(guiName).AnnFrame,, {Transparency = 1}):Play()
			game:GetService("TweenService"):Create(players.PlayerGui:WaitForChild(guiName).AnnFrame.AnnText,, {TextTransparency = 1}):Play()
			game:GetService("TweenService"):Create(players.PlayerGui:WaitForChild(guiName).AnnFrame.AnnText,, {BackgroundTransparency = 1}):Play()
			game:GetService("TweenService"):Create(players.PlayerGui:WaitForChild(guiName).AnnFrame.Names,, {TextTransparency = 1}):Play()
			game:GetService("TweenService"):Create(players.PlayerGui:WaitForChild(guiName).AnnFrame.Title,, {TextTransparency = 1}):Play()
			game:GetService("TweenService"):Create(players.PlayerGui:WaitForChild(guiName).AnnFrame.Icon,, {ImageTransparency = 1}):Play()
			players.PlayerGui:WaitForChild(guiName).AnnFrame.AnnText.Text = ""


game.ReplicatedStorage.MACoreGui:FireAllClients("AnnGui", fulltext)

Instead of

game.ReplicatedStorage.MACoreGui:FireAllClients(player, "AnnGui", fulltext)

On the client do

game.ReplicatedStorage.MACoreGui.OnClientEvent:Connect(function(guiName, fulltext)

Instead of

game.ReplicatedStorage.MACoreGui.OnClientEvent:Connect(function(player, guiName, fulltext)

I needed the player because I need the person who announced the announcement. My current problem is that the gui is only displayed for the person who announced it.

Try passing it in after everything else, because I believe in the Roblox API it will replace




When you pass in a user object at the beginning.

Alright, I will put it at the back instead.

I tried putting the player at the back but it still only show for the person who announced it.

Are you testing with multiple players?

Yes, I used the test feature in Studio.

Try pacing in a username instead of a user possibly?

I’m on mobile so its hard to see if there is anything else but you really need to rename your variables as you sometime confuse player(the player that sent the msg) and players(the local player). For e.g on these 2 lines:



if player.PlayerGui:WaitForChild(guiName).AnnFrame.AnnText.Text == fulltext then

Also could you add a print after each if statement in the local script and than test. See which if statements are aren’t passing for the players who didn’t use :m.

Also make sure that every client actually has the GUI when you test (while testing just go to explorer and look through the players playergui while in client view)

I figured it out myself, I placed the local script inside the gui instead of StarterPlayerScript.