Wondering why for example this doesn't work

This didn’t work for me, anyone know why?

local Module = require(game:GetService("ReplicatedStorage"):FindFirstChild("Module")) 
local Idklol = Module["THING"]
print(Idklol)

the “THING” Exists, BTW

Luau identifiers are case sensitive. Idklol and idklol aren’t the same in Luau based on the script, you’re printing idklol and not Idklol.

If that doesn’t solve the issue then we would need to know what’s inside the Module in the Replicated Storage in order to answer this.

1 Like

I made a typo, it still doesn’t work

Inside there is a local module that has a “THING” inside of it

local Module = { 
["THING"] = 0;   }           return Module

You haven’t put brackets after the call to thing if it is a function, i.e.

local Idklol = Module["THING"]() 

it is actually Not a function, I am confused on why this doesn’t work

I made a typo, I still think that its weird the script won’t work

This works.

local Module = {};

Module["THING"] = 0; 
return Module;
1 Like

image
i Copy and pasted the exact same script for ServerScript and module dont know why your facing an issue

1 Like

I tried it both on local script and serverscript
both worked fine

1 Like

Weird it told me it didn’t exist using the original when I pasted it in, but now it works, go figure. Maybe it was due to replication, no idea otherwise.

1 Like

It works now though yes? if not you must have the name wrong for “Module” in FindFirstChild(). Are you sure it is called “Module”. We had to make a ModuleScript and rename it, are you sure you did that?

1 Like

It seems like there was some kind of another problem with studio, and when I relaunched it , the script worked fine.