What am I doing wrong?

local Notifications = {}

function Notifications.Send(Text, Color)
	
	print(Text, Color)
end

function Notifications.Receive(Text, Color)
	
	return Notifications.Send()
end

return Notifications
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")

local Objects = ReplicatedStorage.Objects
local Remotes = ReplicatedStorage.Remotes
local Modules = ReplicatedStorage.Modules

local Notifications = require(Modules.Notifications)
local Colors = Objects.Colors

local Player = Players.LocalPlayer
local PlayerGui = Player.PlayerGui

local Gui = PlayerGui.Gui.Notifications
local Template = Objects.GUI.NotificationTemplate

local info1 = TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.In)

local function Notification(Text, Color)
	local New = Template:Clone()
	New.Text = Text
	New.TextColor3 = Color.Value
	New.Parent = Gui
	task.wait(2)
	TweenService:Create(New, info1, {TextTransparency = 1})
	New:Destroy()
end

local Text = " Helo Wordlsd"
local Color = Colors.Blue

Notifications.Send(Text, Color)

Notifications.Receive(function()
	Notification(Text, Color)
end)

Can you better describe your problem

1 Like

Iā€™m definitely writing the notification module incorrectly

what is the wrong thing that is happening? is the notification not appearing? is there an error when firing?

Im assuming your attempting to create your own signal, unfortunately Luau doesnt work like this.
You can use open source modules or your own
Here is a post comparing the different types of signal modules made by stravant