Hello! I have been trying to make a script that transports a table from a client to a server, but my test has now shown anything and it's almost as if it doesn't run? Please help.
--Client--
script.Parent.Confirm.MouseButton1Click:connect(function()
if #script.Parent.Order:GetChildren() >= 1 then
script.Parent:TweenPosition(UDim2.new(-0.793, 0,0.173, 0),0,1,1)
clientmsg("Success","Your order has been sent to our crew and will be served to you at cruise, thank you for flying with Harbour Airways.")
game:GetService("ReplicatedStorage").FoodBooking.PlaceOrder:FireServer(script.Parent.Order:GetChildren())
else
clientmsg("Error","You must have one or more items in your order.")
end
end)
--Server--
game:GetService("ReplicatedStorage").FoodBooking.PlaceOrder.OnServerEvent:connect(function(plr,order)
local item = Instance.new("StringValue",game:GetService("ServerStorage").PlrFoodData)
item.Name = "-"
local clone = item:Clone().Parent
for i,v in pairs(order) do
print(order)
end
end)
It does not print the table as it is meant to.

9 comments
Have you tried printing through both scripts to check if it runs through, prints the information you want to send to the server in the client-script, the event gets fired on the server-side, etc?
May be trying setting the table as a variable instead of the thing itself???
Try for_,v in pairs(script.Parent.Order:GetChildren()) do
you can also unpack the table and send the values that way.
For security reasons you cannot send the server a table from the client.
I have before, if not then How am I going to do this??^
Sorry OP. What I meant is you can't pass userdata from the client to server.
Why do you need to send userdata to the server? You can make a table of strings to send to the server instead. Remember that the server will only accept integer indexed tables (else it auto converts).
I am trying to send a table not a userdata. ^