mirror of
https://github.com/imezx/Warp.git
synced 2025-04-24 15:10:03 +00:00
Update Serdes.luau - Client infinite yield warning
Added a warning for yielding identifiers on the client. (10s)
This commit is contained in:
parent
5cf44bd21f
commit
51a51f66cf
1 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue