Trouble accessing module script table with local script

Im tryna access this table i made for my combat system so i can make the char stop running when attacking/blocking/etc… the table is in a module script so easier to access from anywhere which is located in the server storage.

My issue here is that im having trouble accessing my table since i require it from a local script and my module is in the server storage. So ive tried putting it in the replicated storage as both server and client can access it but when i require it, an error pops up sayin “cant require” some like that… And also ppl saying that its bad putting important module in the replicated storage as its easier for exploiters since the client have access to the module…

Another solution is working with attributes which i dont want to cus it would make my code not really optimized, id rather just use table or attributes but not both… ive tested it and it works but arhg no no no :joy:

Also ive tried making my whole running system server side working with remote events but theres a delay between input and execution since… server side…

Finally i tried another remote event solution which is basically trigger the client when attacking, blocking, etc… which works? in a way but id prefer using my tables cus it would be much more easier.

If anyone can help, a big thanks :+1:

1 Like

You should post the error you’re getting. There’s not enough information to tell you what’s wrong.

Putting a module script in ReplicatedStorage and requiring it will not produce any errors as a product of just existing within ReplicatedStorage (this goes for both the server and the client). Most likely there’s a wrong format happening within the module script itself, like you forgetting to return a value.

Also if this is information that you want the client to utilize, it’s not important information. Don’t worry about exploiters reading values in this case. If your module shares both sensitive and non-sensitive information then you need to split them up into separate module scripts and under their protective parents.


this is what happen when i put my module in replicated storage

“Requested module experienced an error while loading” errors will always carry an actual error with them. Look at the first error that popped up. That’s the reason why your module isn’t loading. You moved the module script to ReplicatedStorage without making changes to the scripts that assume it’s in ServerStorage.

msedge_4kXio4w1ez

1 Like

w man, i didnt even saw this one i was sure i checked every script to modify the code so i require the correct path ahah, tysm preciate u

1 Like

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