Arguments not being passed through remote correctly

The notification to run a function when clicked.
It keeps saying the clicked callback is nil.

Client Code

local Remote = game.ReplicatedStorage.Remotes.Events.NotifyPlayer

Remote.OnClientEvent:Connect(function(text, duration, clicked)
	local template = script.Parent.Clip.Template:Clone()
	template.Text = text
	template.Visible = true
	template.Parent = script.Parent.Clip
	template.Notification:Play()
	
	template.Button.MouseButton1Click:Connect(function()
		clicked()
	end)
	
	if duration < math.huge then
		task.wait(duration)
		template:Destroy()
	end
	
	
end)

Server Code

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Mods,Remotes = ReplicatedStorage.Modules,ReplicatedStorage.Remotes

local clicked = function(plr)
	if game["Run Service"]:IsServer() then
		Remotes.Functions.invokeInfo:InvokeClient(plr)
	elseif game["Run Service"]:IsClient() then
		Remotes.Functions.InvokeInfo:InvokeServer(game.Players.LocalPlayer)
	end
end

Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function()
		Remotes.Events.NotifyPlayer:FireClient(plr, "Welcome! Click to view important information.", 10, clicked)
	end)
end)

Error

  19:33:01.203  Players.Jerold09362.PlayerGui.Notifications.Notification Client:11: attempt to call a nil value  -  Client - Notification Client:11
  19:33:01.203  Stack Begin  -  Studio
  19:33:01.203  Script 'Players.Jerold09362.PlayerGui.Notifications.Notification Client', Line 11  -  Studio - Notification Client:11
  19:33:01.204  Stack End  -  Studio

you can’t pass a function through a remote, and I’m not sure why you want to. just do this:

template.Button.MouseButton1Click:Connect(function()
	Remotes.Functions.InvokeInfo:InvokeServer(game.Players.LocalPlayer)
end)

You can’t pass functions through an event, if you want to do something similar, you can make the client call the function from a module script with it’s name

I made a module containing click IDs in strings (the Info was added as the code below), once the notif event is fired, the client checks if there is in fact a string ID provided then checks if the string ID is valid and then connects the function provided to MB1Click and TouchTap.

{
    ["Info"] = function(...) not adding code here in this post because im too lazy to do that end,
}