From d4c425358488596d314c505e0f25f67b45f1a480 Mon Sep 17 00:00:00 2001 From: Tazmondo Date: Sun, 10 Dec 2023 16:03:15 +0000 Subject: [PATCH] add warning when shared identifier takes too long --- lib/Identifier.luau | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Identifier.luau b/lib/Identifier.luau index 1e1c191..8f36608 100644 --- a/lib/Identifier.luau +++ b/lib/Identifier.luau @@ -27,10 +27,16 @@ function Identifier.Shared(Name: string) return Id end else + local delayWarn = task.delay(5, function() + warn(`Yielded while initializing identifier: {Name}. It may not exist on the server!`) + end) + while not Remote:GetAttribute(Name) do Remote.AttributeChanged:Wait() end + task.cancel(delayWarn) + return Remote:GetAttribute(Name) end end, Name)