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!
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!
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
That is not how require() work.
local module = require(game.ReplicatedStorage.ModuleScript) print(module[1]) --output: zomspi