DYUGAME
(DYUGAME)
#1
So I tried to get server module values script by client script but it always return with nil value
I don’t know any solution so far
My Server Script
local modulescript = require(game:GetService("ReplicatedStorage"):WaitForChild("ModuleScript"))
local Table1 = {"a","b","c"}
modulescript[1] = Table1
My Local Script
local modulescript = require(game:GetService("ReplicatedStorage"):WaitForChild("ModuleScript"))
print(modulescript[1])
My Module Script
local module = {}
return module
You can’t transfer data from server to client via ModuleScript, instead you should use a RemoteEvent.
Server:
local plr = -- You should get the player here.
local table = {}
game.ReplicatedStorage.RemoteEvent:FireClient(plr, table)
Local script
game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function(table)
-- Your code
end)
DYUGAME
(DYUGAME)
#3
Yea I think that the best solution for me
system
(system)
Closed
#4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.