Hello, the title says it all. I am trying to get the server to send a client a table that came from inside a module. I tried cloning the table to see if that works but it won’t. I am using remote events for this. Everything inside the table should be accessible for the client so I don’t understand why it isn’t working. If anyone can help, that would really help me. Thanks!
Server Script
local snip = require(script.Snippets.Snippet1)
REMOTE.Event.SendSnippetToClient:FireClient(player, snip)
Module script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local CutsceneActions = require(ReplicatedStorage.Modules.Enums.CutsceneActions)
local snippet: CutsceneActions.snippet = {
[0] = {
Caption = "Hello"
}:: CutsceneActions.dialogue,
[5] = {
Caption = "Hiiiiiii"
}:: CutsceneActions.dialogue,
}
Local sScript
REMOTE.Event.SendSnippetToClient.OnClientEvent:Connect(function(snippet: CutsceneActions.snippet)
warn(snippet[0])--prints nil
for length, cutsceneAction in ipairs(snippet) do
task.wait(length)
if cutsceneAction.Type == "dialogue" then
dialogue(cutsceneAction)
end
end
end)