paper-planeSending a Message

The event expects 3 arguments:

type : String

genre : String

args : Table

Type : String

To send a message, provide SendMessage

Genre : String

This is the second argument, and it could be: "Notice", "Alert", or "Notification"

Args : Table

This is the third and final argument. It must be a table containing a key named "Messages", otherwise the event will fail.

Example Script

Script
local event = game:GetService("ReplicatedStorage"):WaitForChild("ActivExternaleAPI")

if not event then 
	warn("Warn :: Event was not found in ReplicatedStorage!!")
end

local noticeTable = {
	["Message"] = "Need help? Visit our communications server."
}

local alertTable = {
	["Message"] = "This is an error message."
}

local scstbl = { -- success table
	["Message"] = "This is a success message."
}

while wait(5) do
	event:Fire("SendMessage", "Notice", noticeTable)
	event:Fire("SendMessage", "Alert", alertTable)
	event:Fire("SendMessage", "Notification", scstbl)
end -- this will send all the messages every 5 seconds(loop)

Last updated