Hello. I am new to remote events and I wanted to pass a table value from a local script to a server script. This is what I want to pass:
ClockTime[1]
And this changes every 60 seconds:
ClockTime = {12, 1, 2, 3, 4, 5, 6}
Hello. I am new to remote events and I wanted to pass a table value from a local script to a server script. This is what I want to pass:
ClockTime[1]
And this changes every 60 seconds:
ClockTime = {12, 1, 2, 3, 4, 5, 6}
Heres a quick example.
local
local Table = {"val1","val2"}
local Event = game.Workspace:WaitForChild("PassValueEvent")--Normal remote event
Event:FireServer(Table)
Server
local Event = game.Workspace:WaitForChild("PassValueEvent")
Event.OnServerEvent:Connect(function(playerThatFired,Table)
--First value will always be the player that fired the event.
print(playerThatFired," fired the event and sent ",#Table," things in a table.")
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.