Hello!
I am trying to make a notification system with a module script. This is my first time experimenting with module scripts, so this is why I am creating a post about this.
Whenever I run it without having any parameters needed, it works perfectkly fine.
But whenever I use parameters, it has the output of Players.aswdgsagdb.PlayerGui.SmallNoti.Notifications:7: invalid argument #3 (string expected, got table) - Client - Notifications:7
Heres my code:
ModuleScript
local notifications = {}
function notifications.SendNoti(Text1, Text2)
local notificationFrame = script.Parent.Section.NotificationFrame
local newNoti = notificationFrame:Clone()
newNoti.Parent = script.Parent.Section
newNoti.Subject.Text = Text1
newNoti.Description.Text = Text2
newNoti.Visible = true
print("Sent Notification!")
end
return notifications
LocalScript:
local notiMod = require(game.Players.LocalPlayer.PlayerGui.SmallNoti.Notifications)
notiMod:SendNoti("Server", "Test")
print("passed through whole script!")
If you need the code without the parameters to help me out, I can give it.
Anyone know why it happens and a sloution? Much appreciated.