Import Style like Javascript

This is just for curiosity, can we make things like
import('InstanceName) from (‘LocationString’)?

Right now I can make import(‘InstanceName’).from(‘LocationString’) . As you can see, what I want to achieve is removing the ‘.’, is it possible?

No, not possible. Are you suggesting changing how imports/modules/require works or somehow removing the dot from method calls?

You can require() a ModuleScript and call functions:

local s = require(script)
s.my_func()

You cannot create custom keywords or operators in lua, so unless you want to write your own parser and executor the answer is no.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.