diff --git a/Pronghorn/New.luau b/Pronghorn/New.luau index c21d137..90c7ceb 100644 --- a/Pronghorn/New.luau +++ b/Pronghorn/New.luau @@ -177,7 +177,7 @@ function New.Event(): Event<...any> Fire = function(_self: Event<...any>, ...: any): () local currentlyWaiting = table.clone(waiting) table.clear(waiting) - for _, callback in callbacks do + for _, callback in table.clone(callbacks) do task.spawn(callback, ...) end for _, callback in currentlyWaiting do @@ -268,7 +268,7 @@ function New.QueuedEvent(nameHint: string?): Event<...any> else local currentlyWaiting = table.clone(waiting) table.clear(waiting) - for _, callback in callbacks do + for _, callback in table.clone(callbacks) do task.spawn(callback, ...) end for _, callback in currentlyWaiting do @@ -350,7 +350,7 @@ function New.TrackedVariable(variable: any): TrackedVariable variable = newValue local currentlyWaiting = table.clone(waiting) table.clear(waiting) - for _, callback in callbacks do + for _, callback in table.clone(callbacks) do task.spawn(callback, oldValue, newValue) end for _, callback in currentlyWaiting do diff --git a/Pronghorn/init.luau b/Pronghorn/init.luau index 00cbe54..80b1c37 100644 --- a/Pronghorn/init.luau +++ b/Pronghorn/init.luau @@ -31,7 +31,7 @@ ║ ██████▀██▓▌▀▌ ▄ ▄▓▌▐▓█▌ ║ ║ ║ ║ ║ -║ Pronghorn Framework Rev. B75 ║ +║ Pronghorn Framework Rev. B76 ║ ║ https://github.com/Iron-Stag-Games/Pronghorn ║ ║ GNU Lesser General Public License v2.1 ║ ║ ║