Skip to content

Instantly share code, notes, and snippets.

@howmanysmall
Created August 6, 2019 00:17
Show Gist options
  • Save howmanysmall/b320c92b0a19a63684ab56e6a4da9815 to your computer and use it in GitHub Desktop.
Save howmanysmall/b320c92b0a19a63684ab56e6a4da9815 to your computer and use it in GitHub Desktop.
-- You should use the benchmarker to compare this one to the one you have. :P
local SpawnEvent = Instance.new("BindableEvent")
SpawnEvent.Event:Connect(function(Function, Pointer) Function(Pointer()) end)
local function FastSpawn(Function, ...)
local Length = select("#", ...)
local Arguments = {...}
SpawnEvent:Fire(Function, function() return unpack(Arguments, 1, Length) end)
end
return FastSpawn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment