@FieryEvent I will make a community resource soon on lag with examples of the tick usage, if you don’t mind waiting. In the meantime, I do have a lot of sensitive code I would rather not reveal.
The coroutine library of course, there’s nothing that can’t be accomplished with coroutines or bindables even due to their threading behavior that can through spawn.
Essentially fastSpawn, a function that would create a new thread since event listeners are called in a new thread (and show error information as well):
local function func(...) while true do wait() end end
local function fspawn(f)
local b = Instance.new("BindableEvent")
b.Event:Connect(f)
b:Fire()
b:Destroy()
end
fspawn(func)
wait(3)
print("prints")
coroutine.resume(
coroutine.create(function()
error()
end)
) --> no traceback for error
coroutine.wrap(error)("ERROR") --> error
-- both error
spawn(function() error() end)
fspawn(function() error() end)