How can I change a ModuleScript's variable from another ModuleScript?

Hello, fellow developers. Today I was working on my FPS framework and was trying to make a reload function. The thing is, I wasn’t able to figure out how to change the ammo variable in the gun’s ModuleScript from the MainModule, which holds all the main functions such as shooting and aiming. How can I achieve this? Any help would be greatly appreciated.

Thanks,
SpeakerDev

local Module = require(--wherever your module is)
Module.Ammo = --new value
1 Like