I feel like my networking library isn't as efficient as it could be :p

I use ID’s to tell different “Pings” apart, but tbh that feels kinda hacky. Is there a different method of doing that?
If you spot something else off lmk!
Module:

local Remote = script.RemoteEvent
local Ping = {}
function Ping.new()
	local self = setmetatable({},{__index = Ping})
	--Add into pings
	table.insert(Ping, self)
	self.ID = table.find(Ping, self)
	return self
end

function Ping:Connect(fn)
	return Remote.OnServerEvent:Connect(function(Player, OtherID, ...)
		if OtherID == self.ID then
			fn(Player, ...)
		end
	end)
end

function Ping:Fire(...)
	Remote:FireServer(self.ID, ...)
end

return Ping

It is indeed somewhat hacky. What I suggest doing if you want the ID to just be a unique identifier is to get a uniqueID from HttpService with: HttpService:GenerateGUID(false).

Updated code:

local HttpService = game:GetService("HttpService")
local Remote = script.RemoteEvent
local Ping = {}
function Ping.new()
	local self = setmetatable({},{__index = Ping})
	--Add into pings
	table.insert(Ping, self)
	self.ID = HttpService:GenerateGUID(false)
	return self
end

function Ping:Connect(fn)
	return Remote.OnServerEvent:Connect(function(Player, OtherID, ...)
		if OtherID == self.ID then
			fn(Player, ...)
		end
	end)
end

function Ping:Fire(...)
	Remote:FireServer(self.ID, ...)
end

return Ping