Best way to send a table to the client

Hello, I have an issue where I have to send over information in a mixed table so I can update the clients UI but I need to be able to read this information which has now converted to a string instead of a number. My table has a string then a number than a string again and it looks like this:
image
When i pick up an item it is fine but when I edit that value the 1 becomes a string and this screws up my whole table and the way that I read it.

1 Like

This shouldn’t be an issue. Sending this over a RemoteEvent will not cause any losses. You will be fine.

You don’t have mixed string and number keys on the same table. Nested tables are ok.

When i move it to another slot this happens:
image
and the 7 becomes a string and I don’t know how to convert it back.

Maybe instead of [1] you could do [“Slot1”] and then [“Equipment”] [“Slot1”] to get the value of it

Please display your magnificent Lua so we may gaze upon it and help figure out what the issue may be

(30char limit didn’t like “Please show your code”, so I have to add tons of filler)

You need to return it via a remotefunction, first make the table on the server eg Table = {
[“Equipment”] = {
[1] = “Spear”
}
}
return Table

If you are using a RemoteEvent I don’t think it can do returns