I cannot require an object from this table in another script?

Module Script

local inGame = {"zomspi", "other"}

return inGame

Local Script

local plr = "zomspi
print(require(game.ReplicatedStorage.ModuleScript[plr]))

Thanks!

2 comments

0

That is not how require() work.

0

local module = require(game.ReplicatedStorage.ModuleScript)                          print(module[1]) --output: zomspi