How do you get the output from Lua VM 5.1 (FiOne)?

Hi there, I am making a scripting sandbox game, and to load local scripts, I have to use a custom loadstring module (Lua VM 5.1). Now my current way of getting print and warn outputs is by setting the environment of the loadstring to a metatable that receives print and warn functions. The issue is, is that this does not work with the loadstring module. My sandbox metatable works with the default loadstring from Lua U, but not with the module.

The output logs into the devConsole, I just want to receive that text (without using MessageOut).

Sandbox:

local module = {
	sandbox = function(plr,env,client)
		local sandbox = setmetatable({
			print = function(...)
				print(...)
			end,
			warn = function(...)
                              print(...)
			end,
		},

Use of loadstring module:

local source = input
local f = loadstring(source)
local env = getfenv(f)

local sandbox = require(sandboxModule).sandbox(plr,env,true)
setfenv(f,sandbox)
local success,errorMsg = pcall(f)