I have a notification system, but it only works on the local client.
When clicking send, it all works fine but it only shows for the player who sent it, not on all players in the game.
Here is what I have, any help or suggestions on what to do?
ReplicationStorage → Notifications → NotificationTemplate

Notifications (ModuleScript)
local module = {}
local NotifyTemplate = script:WaitForChild("NotificationTemplate")
function module:NotifyPlayer(player, text)
local PlayerGui = player:WaitForChild("PlayerGui")
local NotificationsGui = PlayerGui.PlayerSideNotif:WaitForChild("Popups")
local newNotify = NotifyTemplate:Clone()
newNotify.Text = text
newNotify.Parent = NotificationsGui
newNotify.BackgroundColor3 = Color3.fromRGB(77, 77, 77)
newNotify:TweenSize(UDim2.new(0, 380,0, 28), Enum.EasingDirection.Out, Enum.EasingStyle.Back,0.15)
coroutine.wrap(function()
wait(3)
for t = 0,1,0.1 do
newNotify.BackgroundTransparency = t
newNotify.TextTransparency = t
wait()
end
wait(0.05)
newNotify:Destroy()
end)()
end
return module
This is in the StarterGui

sendScript (LocalScript)
script.Parent.MouseButton1Click:Connect(function()
local v1 = require(game.ReplicatedStorage.Notifications)
v1:NotifyPlayer(game.Players.LocalPlayer, script.Parent.Parent.notifMessage.Text)
end)
How would I get this to make the message show on all clients?
Video of system in action :
You’ll have to send the notification info to the server with a RemoteEvent, who can then forward it to the correct client (with the same or a new RemoteEvent).
To send it to clients, you will first need to go to the server. The server must verify if you’re a player and that you actually sent the notification. Then, the server will send the notification to other clients.
I have set it so that it will send a remote event now, but how then would I access the text because I cant do script.Parent.Parent.notifMessage.Text ?
Here is what I got now.
Notifications (MODULE SCRIPT INSIDE ReplicatedStorage)
local module = {}
local NotifyTemplate = script:WaitForChild("NotificationTemplate")
function module:NotifyPlayer(player, text)
local PlayerGui = player:WaitForChild("PlayerGui")
local NotificationsGui = PlayerGui.PlayerSideNotif:WaitForChild("Popups")
local newNotify = NotifyTemplate:Clone()
newNotify.Text = text
newNotify.Parent = NotificationsGui
newNotify.BackgroundColor3 = Color3.fromRGB(77, 77, 77)
newNotify:TweenSize(UDim2.new(0, 380,0, 28), Enum.EasingDirection.Out, Enum.EasingStyle.Back,0.15)
coroutine.wrap(function()
wait(3)
for t = 0,1,0.1 do
newNotify.BackgroundTransparency = t
newNotify.TextTransparency = t
wait()
end
wait(0.05)
newNotify:Destroy()
end)()
end
return module
SendNotifToPlayers (SCRIPT INSIDE ServerScriptService)
local SendToPlayers = game.ReplicatedStorage:WaitForChild("SendToPlayers")
SendToPlayers.OnServerEvent:Connect(function()
local v1 = require(game.ReplicatedStorage.Notifications)
v1:NotifyPlayer(game.Players:GetPlayers(), script.Parent.Parent.notifMessage.Text)
end)
SENDSCRIPT (LOCALSCRIPT INSIDE sendButton)
local SendToPlayers = game.ReplicatedStorage:WaitForChild("SendToPlayers")
script.Parent.MouseButton1Click:Connect(function()
SendToPlayers:FireServer()
end)
Error, from SendNotifToPlayer inside ServerScriptService
notifMessage is not a valid member of DataModel “Game”
I am aware of why this happens, but not aware of a fix? Any help?
You can pass an argument from the client here:
SendToPlayers:FireServer(script.Parent.Parent.notifMessage.Text)
And grab it in the server:
SendToPlayers.OnServerEvent:Connect(function(playerWhoSent, text)
local v1 = require(game.ReplicatedStorage.Notifications)
v1:NotifyPlayer(game.Players:GetPlayers(), text) -- changed
end)
Also, NotifyPlayer takes a single player, but you’re giving it a table. So that should actually be:
SendToPlayers.OnServerEvent:Connect(function(playerWhoSent, text)
local v1 = require(game.ReplicatedStorage.Notifications)
for _, player in game.Players:GetPlayers() do
v1:NotifyPlayer(player, text)
end
end)
If you wanted to get fancy you could send a message to everyone except playerWhoSent, and have the sender handle their own box. But the extra round trip is also fine.