How to require a module script through a local script

This is a support category for asking questions about how to get something done on the Roblox websites or how to do something on Roblox applications such as Roblox Studio.

You can write your topic however you want, but you need to answer these questions:

  1. i want to acess a variable in a module script through a local script

  2. this code isnt running
    local mod = require(game.ReplicatedStorage.ModuleScript)

if mod.VariableName == false then
print(“AAAAAAAAAAAAAA”)
end

Try game.ReplicatedStorage:WaitForChild(“ModuleScript”)

1 Like

Parent the module script to the local script and use require(script.ModuleScript).

these dont work sorry

(theres a character minimum iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)