Okay, Loadlibrary

Create returns an instance (object), from what I’ve seen.

I mean create with no specification of which object.
just, .Create

Thats it

yseyeysyesssssssssssss

Well then it’s just going to error. You need to specify the instance name <string>.

Weird

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

It’s not really weird. Create is just an old version of Instance.new, but with extra steps and options.

oh alright

hhhhhhhhhhhhhhhhhhhhhhhhhh

Support for LoadLibrary was dropped a while back, attempting to reference it will result in the linter displaying an ‘unknown global’ warning.

i know.

jiiiiiiiiiiiiiiiiiklkjljlk

getfenv() is not deprecated. Try this:

local function createSandbox(code)
	local func = loadstring(code)
	
	local sandboxEnv = getfenv(func)
	sandboxEnv.require = function(...)
		print("require has been disabled")
	end
	
	func()
	
	return sandboxEnv
end

task.spawn(function()
	createSandbox("require('Test')")
end)