Skip to content

Commit

Permalink
Merge pull request #7 from Tazmondo/main
Browse files Browse the repository at this point in the history
add warning when shared identifier takes too long
  • Loading branch information
jackdotink authored Dec 10, 2023
2 parents 80e2a7e + d4c4253 commit 37f8712
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Identifier.luau
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 37f8712

Please sign in to comment.