RemoteFunction data problem

image
The image’s self-explanatory, but basically, when I invoke a function in server using RemoteFunction:InvokeServer(), the value returned by the server (printed the first one) isn’t the same as the client’s?

1 Like

Could it be that the 2nd time you call the Get method it is returning extra stuff? Try to put DataStores:Get(Player.UserId, name) in a variable, and use that variable for printing and returning

image
image
Didn’t seem to work

I tried returning another value, a “stringvalue”, and it did return it…?
image
image

That’s odd? Could it be something in the Get method somehow causing those 2 keys to appear? Could I see what the Get Method contains? That’s the only real explanation it could be, unless it’s something else in which case you could maybe try to do a find all search on Invited and Invites and if anything appears?

First, I tried to make sure it’s not the tables problems by returning a table with many strings,
image
image
And it seemed to work.

Here’s what Get method contains:
image
And printing data[UserId][get] does print the table with “Invited” and “Invites”

Oh by the way, the problem is that Invited and Invites doesn’t appear, it’s a data I need and not the other way around (I don’t want them to disappear)

It could be because the table is mixed, if you return a mixed table, the string keys are lost

You may need to refactor your table

Edit: I took that from the BindableFunction article but the same applies to RemoteFunctions if you check the Parameter Limitation heading in the post @Fangous sent

1 Like

The data that can be sent between the client and server has some certain limitations. (See: Bindable Events and Functions | Roblox Creator Documentation) In this case, any non-replicated instance will be set to nil, as well as metadata within any metatables.

1 Like

Oh that’s the most plausible answer, thank you!

1 Like