RoNotify is a free resource for roblox developers designed to make it easy to create custom notifications inside of their roblox games.
Created by Treklatom (me)
Link to the model:
RoNotify - Model Link
Setting up the model + code:
Setting up RoNotify is incredibly easy as all you need to do is:
- Move the folder into ServerScriptService
- Use require() to reference the script named Source in the folder in a server script. Here is an example of this in code:
local Folder = game.ServerScriptService:WaitForChild("RoNotify") -- The folder of the model
local RoNotify = require(Folder:WaitForChild("Core")) -- The module script
- Finally call .Notify() from the module script named Core inside the folder to fire a notification when needed. You will need to include the following parameters: (Player, Icon, Title, Message, Properties) in that order. Here is an example:
RoNotify.Notify(Player, Icon, Title, Message, Properties) -- Function to call notification
Here is information on each parameter you need to include:
- Player - the player you want to receive the notification
-
Icon - the image to be displayed next to the title and message. Will default to the following image if no image is given or the string is empty:
- Title - the title of the notification
- Message - the message of the notification
- Properties - a dictionary of properties to customize the notification. (An example of this is available in the code example below)
If you are unsure on the elements of the notification, this diagram may help:
Overriding default notifications:
To override notifications, you need to call .Override() followed by the name of what you want to override. For example: RoNotify.Override("BadgeNotificationsActive")
would disable badge notifications when RoNotify is set to: local RoNotify = require(game.ServerScriptService:WaitForChild("RoNotify"):WaitForChild("Core"))
Here are currently all the options to override:
- BadgeNotificationsActive - badge notifications
More options will be added in the future.
Using the model + more info:
Using a module script, the model allows scripts to call a function on the Server to display a custom notification on any client with a range of properties to customize. All the properties are listed below:
- BackgroundTransparency - The transparency of the background
- BackgroundColor - The color of the background
-
CornerRadius - The corner radius of the background
- OutlineEnabled - If the outline is enabled
- OutlineColor - The color of the outline
- OutlineThickness - The thickness of the outline
-
OutlineTransparency - The transparency of the outline
- TextColor - The color of the text
-
IconColor - The color of the icon
- IdleTime - The duration of time the notification is shown for
-
TransitionTime - The duration of the tween in/out
- TransitionStyle - The easing style of the tween animation
- TransitionDirection - The easing direction of the tween animation
Here is an example of how it may be used. In this example, it displays a notification to any players in a server who are friends with a player who joins the game:
local Folder = game.ServerScriptService:WaitForChild("RoNotify") -- The folder of the model
local RoNotify = require(Folder:WaitForChild("Core")) -- The module script
game.Players.PlayerAdded:Connect(function(Plr) -- Event when a player joins the server
wait(5) -- A delay (optional)
for i, Player in pairs(game.Players:GetPlayers()) do -- Loops through all players in the servrer
if Player:IsFriendsWith(Plr.UserId) then -- Exludes players who aren't friends with the player who joined
local Icon = "http://www.roblox.com/asset/?id=10885655986" -- Icon for the notification
local Title = "Player joined" -- Notification title
local Message = "Your friend " .. Plr.DisplayName .. " has joined the game." -- Notification message
local Properties = {
-- Background
["BackgroundTransparency"] = .25; -- The background transparency
["BackgroundColor"] = Color3.fromRGB(46, 46, 46); -- The background color
["CornerRadius"] = UDim.new(0, 20); -- Corner radius of the background
-- Outline
["OutlineEnabled"] = true; -- If the outline is enabled
["OutlineColor"] = Color3.fromRGB(226, 226, 226); -- The outline's color
["OutlineThickness"] = 3; -- The outline's thickness
["OutlineTransparency"] = 0; -- The transparency of the outline
-- Text
["TextColor"] = Color3.fromRGB(226, 226, 226); -- The text color
-- Image
["IconColor"] = Color3.fromRGB(255, 255, 255); -- Imnage color
-- Timings
["IdleTime"] = 3; -- The duration of time the notification is shown for
["TransitionTime"] = 0.25; -- The duration of the tween
-- Animation
["TransitionStyle"] = Enum.EasingStyle.Linear; -- The easing style of the tween
["TransitionDirection"] = Enum.EasingDirection.InOut; -- The easing direction of the tween
}
RoNotify.Notify(Player, Icon, Title, Message, Properties) -- Function to call notification
end
end
end)
Here is a video of the code working:
Missing features?
Try carrying out the following actions:
- Delete the model from your inventory
- Re-download the model and replace the original
- Test and the new features should be available
I plan to add more types of popups and customization in the future so feel free to bookmark this post
If you are unsure on how to use module scripts, see this documentation:
ModuleScript - Documentation
Feel free to leave any feedback on how it could be improved or changed and I hope you find this useful in some way