Packet - Networking library

this means it was not able to find the packet

this can happen because

  1. the packet was not setup on both server and client

  2. packets have different types defined on server and client

make sure you setup the packets as soon as the server starts

I am doing just that, i even printed how many times they were being made to see if i had any dupes that had different types, i made this packet twice on server and client and these are the types on all of them:

CLIENT:

image
image

SERVER:

image
image

Keep in mind that im using the PACKET.Any Type because the previous type i was using was not working, even though i was sending the correct datatype and value, i even checked multiple times using prints inside the Packet module.

(And as you can also see they are setup when the server starts, also indicated by the line number being very low)

(Another note is that, in Studio there is no error but when i go into my ROBLOX Game this error pops up)

:arrow_up: Update 1.4

  1. FPS spikes no longer cause the clients timer to fall behind
  2. Removed incorrect rounding for UDim, UDim2, Vector2S16 and Vector3S16
  3. Any type numbers can now go higher then 4294967295
  4. Any type tables only use 2 bytes instead of 3 and now have a unlimited size
  5. Added StringLong type that supports a length longer then 255
  6. Added BufferLong type that supports a length longer then 255

My issue has been fixed now after this update :+1:

Oh and also could you show the version of the module at the top of it?

Just so people can see what version their module is at.

You can find the version number as a attribute

image

1 Like

I would like to ask if there is a timer or anything like that inside the Packet Module? Something that maybe waits for Fires?

I am not invoking nor firing using the Packet Module and i am getting this:
image

This lag is building up, it doesn’t lag at first and then it starts lagging after a few minutes.
Maybe it could be one of my scripts? (Might be something related to halting but i do not halt my scripts that much)

(Ive done many tests inside my game, removing things to see if the lag is also in my game, but my only result was that the Packet module was the cause of the lag)

(Something to also take note of is, this lag problem only happened after the new 1.4 version)

if you remove the module does the problem go away

Well i didn’t try that, but if i remove the module my game wouldn’t run which could be kind of contradictory, but i will see what i can do and i will return back with a response

I have a ModuleScript in my game that acts as a main script that controls almost everything, and this module has a main function inside of it where it executes a bunch of other functions.

What i did was comment every single function and go through them one by one uncommenting them and running the game to see if there was any lag spikes, and sure enough i found a Function that was the cause of this.
스크린샷 2025-04-23 163523 스크린샷 2025-04-23 164647

(Keep in mind that i have not gone through every single Function, but while waiting for a reply i will keep going through the other Functions)

The Function was an Inventory Related one and it used the Packet Module once at the start of the game to send data to the Client, so i removed this part of the Function and ran the game again, and vouala the game was back to running smoothly again:

스크린샷 2025-04-23 164823

So my conclusion is that there is something inside the module like a timer or something that is causing this issue.

And also i was Firing to the Client NOT Invoking it.

Line of code that caused it:
image

Packet:

image
This Packet is being made when the script starts.

Just did another test and after removing the Function on the client (The Packet Module still had a Function to call, but i just removed the one that was doing the work)

and found that the lag was also gone after the removal, so i did task.spawn on the Function and the problem did not go away? Which i found to be very interesting

Keep in mind that inside this Function there is no halting (because i task.spawned some Functions inside it)

And even after removing the Functions that could halt without task.spawn, the lag was still there.