Well I have a RemoteEvent, the server sends a table variable with objects to every client.
Then I have a Localscript for each client using .OnClientEvent on the RemoteEvent so they can get the table.
This is what I did to solve it,
--LocalScript
local Event=Game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent")
Event.OnClientEvent:connect(function(ObjectTable)
Data=ObjectTable
end)
I don't like using Global variables however, I personally don't feel comfortable using them... Is there a another way so the variable can be returned via function connected to the event or something? Important: This variable updates every single second

1 comment
Thank you!