Whenever I make a script using coroutine.wrap(function() end) it errors, I know its like coroutine.resume(coroutine.create(function() end)), but when I use it it always errors for some reason, here is an example of what I mean;
coroutine.wrap(function()
print("I'm in a coroutine!")
end)
And when I do something like that, it doesn't work (As shown in the example, it won't print I'm in a coroutine!), is there something that I'm forgetting to add, or am I using it wrong?

4 comments
So, I was using it right, but I just didn't code it correctly?
Well you scripted it fine, you just didn't call the function it returns.
Oh, so thats what the '()' is there for?
Yeah, as you know you use that syntax to call a function. Also you can define parameters for the function in the coroutine if you want so anytime you want to call it, you can input values to use as arguments and the function inside the coroutine can use them (like a regular function).