From 51a51f66cf51b0aab9badcb77aa571630d4685b9 Mon Sep 17 00:00:00 2001 From: xArshy <6077173+xArshy@users.noreply.github.com> Date: Thu, 28 Mar 2024 14:30:00 +0400 Subject: [PATCH] Update Serdes.luau - Client infinite yield warning Added a warning for yielding identifiers on the client. (10s) --- src/Index/Util/Serdes.luau | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Index/Util/Serdes.luau b/src/Index/Util/Serdes.luau index d71743b..dc28cb9 100644 --- a/src/Index/Util/Serdes.luau +++ b/src/Index/Util/Serdes.luau @@ -15,9 +15,18 @@ return function(Identifier: string): number --Event:SetAttribute(Identifier, string.pack("I1", SerInt)) -- I1 -> 255 max, I2 -> ~ 6.5e4 max. (SerInt) end else + local loaded = false + task.delay(10, function() + if loaded then + return + end + warn(`{Identifier} is taking too long to load on the server.`) + end) + while not Event:GetAttribute(Identifier) do task.wait(0.5) end + loaded = true end return Event:GetAttribute(Identifier) -end \ No newline at end of file +end