Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Table through a remote event?

Is it possible to send a table through a remote event and how do you send it?

3 comments

0

yes, RemoteEvent:FireServer({1,2,3,4}), RemoteEvent.OnServerEvent:Connect(function(Player, Table) --ect end)

0

Yes it's possible. I've done it before :P it's like sending regular arguments just its a table. ExampleEvent:FireServer({1,2,3,4,5}), ExampleEvent:FireAllClients({1,2,3}), ExampleEvent:FireClient(plrObj,{1,2,3,4,5})

1 answer

I do it all the time and it's a wonderful way to write your RemoteEvents functions. Example:

--//Client side
REvent:FireServer("Example", {1, 2, 3, 4, 5})


--// Server side
REvent.OnServerEvent:Connect(function(player, request, data) 
	if request == "Example" then
		for i, v in pairs (data) do
			print(v)
		end
	end
end

This discussion is preserved as it was. New answers, comments, and votes are closed.