-
I made this script in which it shoots from the client and goes to the server which then shoots back at the client for everyone to see, I use this for effects, as I do not want to lag the server by putting the debris on the server side
-
Small problem, when I pass a list through this system the list returns as nil, only string values could be read but not values inside the list
This is my code
Client
if cast then
local Send = {
RemoteEvent = "Replicator",
Module = "VFX",
Module_Function = "Hammer_Spikes",
ToSend = {}
}
local Data = {
["Position"] = hit.Position
}
Send.ToSend = Data
_G["Emulator"]["Emulate"]("Client",Send,nil)
end
MiddleMan
Emulator["Emulate"] = function(Side,Values,Target)
if Side == "Server" then
if Target == nil then
_G[Values.RemoteEvent]:FireAllClients(Values.Module,Values)
else
_G[Values.RemoteEvent]:FireClient(Target,Values.Module,Values)
end
return
elseif Side == "Client" then
_G["Emulant"]:FireServer(Values)
return
end
end
end
Server
print("Emulate")
table.insert(values,1,player)
print( values.Module_Function)
_G["Emulator"]["Emulate"]("Server",values,target)
end)
Client To All
print('client')
warn(Module)
_G[Module][Independents.Module_Function](Independents)
end)