How do you get a client module to request info from a server module?

I know the title doesn’t really make any sense, so I’ll break it down; if a client module needs info from a server module, how would you go about getting that info? You can’t require a server module on the client.

I was thinking about RemoteEvents, but that defeats the purpose of having events in modules, getting the event from a server module on the client isn’t possible.

Can you give an example that might correspond to what you’re asking?

I did; say in a client module it needed some information from the server, you can’t require server modules, so how would you get the information? – I know people say not to get info from the server on the client, but apart from RemoteEvents, is there not any other way (excluding RemoteFunctions)?

Depending on the kind of information your client module is trying to access (how often you’re updating it, type of data, etc.), you could use Attributes to track the information from the server module, then update those attributes from said server module whenever you need to.

Then, in the client module, just reference the attributes there (make sure the attributes are in a place that can be referenced by a local script).

If your information is exclusively inside your server module, then I don’t know why you would be opposed to remote events, since that is the primary application for them; to address server-client communication.

Apologies for the late reply; Ok, I’ll work something out with this, thanks.


I know, it’s just you don’t really do this with modules, like systems and stuff, like perhaps a player manager, wanting to get when the player did something on the server, but need the info on the client too, or whatever. The event is usually embedded within the module itself, but you can’t require server modules on the client obviously.

I know it sounds awfully silly and dumb.

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