How would i put this in a coroutine?

So i have this lua code compiler for my game but i want to put it in a coroutine so i can stop loops in the code players write.
I have read into coroutines but they “wont work”, .wrap works but only one time then it errors and idk how to continue.

local compile = require(script:WaitForChild("Yueliang"))
local createExecutable = require(script:WaitForChild("FiOne"))
getfenv().script = nil

local CodeExecute = function(source, env)
	print(source, env)
	local executable
	local env = env or getfenv(2)
	local name = (env.script and env.script:GetFullName())
	local ran, failureReason = pcall(function()
		local compiledBytecode = compile(source, name)
		executable = createExecutable(compiledBytecode, env)
	end)
	
	if ran then
		return executable
	end
	return nil, failureReason
end

local corou = coroutine.wrap(CodeExecute)

return corou

Try something like this

local Thread = coroutine.create(myFunc)
coroutine.resume(Thread, functionArgument1,functionArgument2,functionArgument3...)

ive tryed that before but i get this error
image

and .wrap is propably my only option, since the code calling this module is expecting a function and .create does not return a function