You can’t do Lua spawn(func)
because this will basically error as that’s not how you do Threads
As well When you do it like this Lua spawn(function() func end)
The probem here is that you’re not giving in the right arguments So what you would to make a thread in your Script you can either user Courintines or the spawn function
** Spawn Function**
To start the new thread you will need to do
spawn(function() --In the here is where you can put your arguments
-- Do your stuff in here
print("New thread")
end)
Or
You can do a Courintine instead
And The difference between a Courintine and a Spawn function is that a Spawn function has a delay compared to a Courintine They both create new threads in a script
Example
local NewThread = coroutine.create(function () --In the here is where you can put your arguments
-- Do your stuff in here
print("New Thread created")
end)
NewThread.resume()
Also with coroutines you can resume and yield the at any given time
If you want to know more about Spawn Functions and coroutines you can go read this post that was made a while ago Here