Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can I change a value in a ModuleScript from a local script?

Asked by 9 years ago

(As you can see, i'm a total newbie with modules. I already looked at the wiki. But this still confuses me.) Why does this not print anything? If this does not work with local scripts, how would I bypass this?

--Module script
--There will be more than one variable, and function in the final product, this was just a test.
local module = {}
local pose = false
function mktrue()
    local pose = true
    print(pose)
end

return module
--Local Script

local player = game.Players.LocalPlayer
local TEST= require(player.Character.ModuleScript)


TEST.module.mktrue()

Answer this question