i was working on a notification system, it worked fine yesterday i opened studio and kept getting the error “attempt to index nil with Type”
-- Client -- StarterPlayerScripts
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local StarterGui = game:GetService("StarterGui")
local Event = ReplicatedStorage:WaitForChild("Event")
Event.OnClientEvent:Connect(function(Player, Args)
local s,e = pcall(function()
if Args.Type == "sendNotification" then
StarterGui:SetCore("sendNotification", Args.Info)
end
end)
if not s then
warn(e)
end
end)
and
-- ReplicatedStorage
local Network = {}
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event = ReplicatedStorage:WaitForChild("Event")
function Network.send(Player, Args)
Event:FireClient(Player, Args)
end
return Network
i have no clue what happens i require the module and type
Network.send(Player, {Type = "sendNotification", Info = {
Title = "Test";
Text = "Test";
Duration = 5;
Button1 = "Test";
}})