ModuleScripts are accessable from Server and Client via require()
My issue is that the localscript cant detect changes that are made by the server
My Table: jwnqe = {}
(Normally contains a random generated string. Like in the picture below)
![]()
trying to print the whats in side the table with a local script will result in nil
![]()
ModuleScript:
module = {
tt13 = {},
h3i2u = {},
jwnqe = {},
qwjekweq = function()
local jk123ji = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}
for i = 1, math.huge do
wait(1)
local qweuioqe = ""
for i = 1, 24 do
if i == 5 then
qweuioqe = qweuioqe.."-"
end
if i == 9 then
qweuioqe = qweuioqe.."-"
end
if i == 13 then
qweuioqe = qweuioqe.."-"
end
if i == 17 then
qweuioqe = qweuioqe.."-"
end
if i == 21 then
qweuioqe = qweuioqe.."-"
end
if i ~= 5 or i ~= 9 or i ~= 13 or i ~= 17 or i ~= 21 then
local a = math.random(1,#jk123ji)
qweuioqe = qweuioqe..jk123ji[a]
module.tt13 = qweuioqe
end
end
local asidha1913 = ""
for i = 1, 24 do
if i == 5 then
asidha1913 = asidha1913.."-"
end
if i == 9 then
asidha1913 = asidha1913.."-"
end
if i == 13 then
asidha1913 = asidha1913.."-"
end
if i == 17 then
asidha1913 = asidha1913.."-"
end
if i == 21 then
asidha1913 = asidha1913.."-"
end
if i ~= 5 or i ~= 9 or i ~= 13 or i ~= 17 or i ~= 21 then
local b = math.random(1,#jk123ji)
asidha1913 = asidha1913..jk123ji[b]
module.h3i2u = asidha1913
end
end
local iasdhz = ""
for i = 1, 24 do
if i == 5 then
iasdhz = iasdhz.."-"
end
if i == 9 then
iasdhz = iasdhz.."-"
end
if i == 13 then
iasdhz = iasdhz.."-"
end
if i == 17 then
iasdhz = iasdhz.."-"
end
if i == 21 then
iasdhz = iasdhz.."-"
end
if i ~= 5 or i ~= 9 or i ~= 13 or i ~= 17 or i ~= 21 then
local a = math.random(1,#jk123ji)
iasdhz = iasdhz..jk123ji[a]
module.jwnqe = iasdhz
end
end
end
return module.tt13, module.h3i2u, module.jwnqe[1]
end
}
return module
Script:
local req = require(game.ReplicatedStorage:WaitForChild("ModuleScript"))
local remotekey = ""
function sdas()
local data1 = req.qwjekweq()
end
spawn(function()sdas()end)
wait(4)
print("start")
while wait() do
game.Workspace.Name = req.tt13
remotekey = req.jwnqe
print("[Server]Key: "..remotekey)
end
LocalScript:
local Button = script.Parent.GetMoney
local req = require(game:GetService("ReplicatedStorage"):FindFirstChild("ModuleScript"))
local player = game.Players.LocalPlayer
remotekey = ""
Button.MouseButton1Click:Connect(function()
print(req.jwnqe[1])
end)
Is there any fix for this?