SlateUI
DocsComponentsGitHub
Install SlateUI Plugin
SlateUI
DocsComponentsGitHub
Install SlateUI Plugin

Components

  • installation
  • button
  • inputs
  • notification
  • progressbar
  • loading
  • proximity
  • router
Component

NotificationService

A unified client/server notification system. Fire toasts from the server to individual players or all players, or trigger them locally on the client — same API either way.

Overview

NotificationService uses a single RemoteEvent (SlateUINotification, auto-created in ReplicatedStorage) to bridge server-to-client calls. The client listens for the event and renders toasts from a pre-built GUI template at GUI.SlateUI.Notification.List. Notifications fade in, optionally auto-dismiss, and can be manually closed.

Interactive Preview

New item found in your inventory.

Info

Properties

Success
Error
Warning
Duration (s)3
NotificationService.Notify("Your message here.", {
    status   = "info",
    duration = 3,
})

Client Usage

Call Notify() from a LocalScript to show a notification immediately on the calling client. No server involvement needed for client-initiated toasts.

Client — simple info toast

luau
1
2
3
4
-- LocalScript
local NotificationService = require(game.ReplicatedStorage.SlateUI.NotificationService)
 
NotificationService.Notify("Settings saved.", { status = "success", duration = 3 })

Client — all status variants

luau
1
2
3
4
NotificationService.Notify("Connection lost.", { status = "error", duration = 5 })
NotificationService.Notify("Match starting…", { status = "warning", duration = 4 })
NotificationService.Notify("Round complete.", { status = "success", duration = 3 })
NotificationService.Notify("New item found.", { status = "info", duration = 3 })

Server Usage

Use ServerNotify() to push a notification to a specific player, or ServerNotifyAll() to broadcast to every connected client. Both accept the same opts table as the client API.

Server — notify a single player

luau
1
2
3
4
5
6
7
8
9
-- Script (server)
local NotificationService = require(game.ReplicatedStorage.SlateUI.NotificationService)
 
game.Players.PlayerAdded:Connect(function(player)
NotificationService.ServerNotify(player, "Welcome to the game!", {
status = "info",
duration = 4,
})
end)

Server — broadcast to all players

luau
1
2
3
4
5
-- Announce a round start to everyone
NotificationService.ServerNotifyAll("Round 3 is starting!", {
status = "warning",
duration = 5,
})

Customizing Status Colors

Status colors are defined in the STATUS_COLORS table inside NotificationService. Edit or extend it directly. The mapping is also exposed as NotificationService.STATUS_COLORS so you can reference or override it at runtime from another script.

Adding a custom status type

luau
1
2
3
4
5
6
local NotificationService = require(game.ReplicatedStorage.SlateUI.NotificationService)
 
-- Add a custom "system" status
NotificationService.STATUS_COLORS["system"] = Color3.fromRGB(139, 92, 246) -- violet
 
NotificationService.Notify("System update applied.", { status = "system", duration = 3 })

GUI Hierarchy Required

The GUI must exist at PlayerGui.SlateUI.Notification with a Base template frame inside a List container. The Base frame must contain a Text (TextLabel), a Status (Frame for the color indicator), and an optional Button (TextButton) for manual close and Icon (ImageLabel).

API

PropTypeDefaultDescription
Notify(message: string, opts?: table) -> ()—Client-side. Shows a notification immediately on the local player's screen.
ServerNotify(player: Player, message: string, opts?: table) -> ()—Server-side. Fires the RemoteEvent to one player.
ServerNotifyAll(message: string, opts?: table) -> ()—Server-side. Fires the RemoteEvent to all connected players.
opts.status"info" | "success" | "error" | "warning" | string"info"Controls the Status indicator color. Extensible via STATUS_COLORS.
opts.durationnumber3Seconds before the notification auto-dismisses.
STATUS_COLORS{ [string]: Color3 }—Exposed table — read or mutate to customize or extend status colors.