Notification Module
This module aims to let you sent in-game notification to your players.
Notifications templates need to be created, before using them, with Roblox Studio. You can create a Frame, with inside a TextLabel or an ImageLabel, or even both. Then, put this newly created Frame inside the ReplicatedStorage (inside folders if you want) and reference it in the configuration.
Installation
In your wally.toml file, add this to your dependencies:
Import
You have two solutions to import this module, depending if you wish to import the Controller or the Service on your own, or if you let the module give you the right code.
Configuration
A file called NotificationModule.config.lua is to be created in the folder ReplicatedStorage/Shared/Configs.
Explanation:
default: The name used as a reference for your notification.
TemplatePath: The access path to the template of your notification, starting in the ReplicatedStorage. In this example, our Frame is located here:
ReplicatedStorage/Notifications/DefaultText:
Enabled: Whether your notification contains a text or not.
Path: The path to your TextLabel (or TextButton), starting at the TemplatePath
Image:
Enabled: Whether your notification contains an image or not.
Path: The path to your ImageLabel (or ImageButton), starting at the TemplatePath
StartPos: The starting position of your Frame, usually off-screen.
EndPos: The end position of your Frame, usually on screen.
Duration: The duration of the animation between the StartPos and the EndPos.
Usage
Client Side
This method allows you to send a notification on the screen of an online player.
Usage
Explanation
name: The name of your notification, referenced in your configuration.
text: The text that will be displayed in your notification. Can be nil if your notification doesn't need one.
image: The image that will be displayed in your notification. Can be nil if your notification doesn't need one.