ReplicatedStorage Module Scripts Replication

Hello developers!
I am working on a perk shop GUI, and I want all of the items in the shop to contain: Description, Price, and Rarity.

However, I was wondering if exploiters can change the module in a way that the server will see.
Which means that if I make a Module script like this:

local module = {
    ["Speed"] = {
        ["Description"] = "Make yourself faster",
        ["Price"] = 500,
        ["Rarity"] = "Common"
    }
}
return module

Because I am cloning a template for every perk, and want to get the price from both the server and the client (basically just store it in one place and use in 2).
If the client changes the Price to 0, will the server think it’s 0 (client change) or 500 (original)?

TL;DR: If the client changes the content of a ReplicatedStorage ModuleScript, will the server see it as it was written or as the client module (The edited module)?

Thanks :slightly_smiling_face:

The change won’t be visible to the server. The code will stay the same on the server even if it’s changed on the client.

1 Like

Hello

No they can only see the code not change it. If you have this on the client i would heigly recommend just moving it on to the server.
If the client needs any data just make a remote function to get the data.

1 Like

He said in his post that he wants to access the data from both client and server. If he doesn’t change these values, then this can be kept in replicated storage and remotefunctions won’t be needed for replicating the data in the module.

1 Like

I don’t mind them seeing, but can they change it? I heard that exploiters can access modules.

The client can’t make changes that would affect the server. If they make changes, those changes will only be visible to them.

1 Like

The client can’t make changes that would affect the server. If they make changes, those changes will only be visible to them.

Basically it’s not replicated. Except the changes made on the server, that is the only thing that gets replicated.

So the client can change functions and/or values of the module. That’s why I would use a remote function to ensure that the correct values get shown.

1 Like

Unless LightningLion’s own code changes some values in the module and needs to get the original values, there’s no need for sending the original values again using a remote event or remotefunction. If an exploiter changes the code, you shouldn’t send the original values to them because it causes unnecessary network traffic and the exploiter can just decide not to use them. The exploiter could even decide not to request the values from the server.

@RoBoPoJu Is 100% correct in this case. You dont have to use remote functions because modules wont replicate to the server.