Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Pass a client object to the server with remote events?

Asked by 4 years ago

Is it possible that a client object may be passed to tthe server with remote events?

1 answer

Log in to vote
1
Answered by
starmaq 1290 Moderation Voter
4 years ago

Well you really can't, since the object was created in the client, it's not visible in the server, and even if you :FireServer(the object from the client) it wouldn't show up in the server, the server would just recieve that object that can only be seen from the client, and changing any property of that object from the server, will actually just change in the client. Another thing people always mistake, is doing :FireServer(object:Clone()), cloning the object doesn't really do anything, since again: it's being cloned in the client, so even the clone is only a clinet-side thing.

The only thing you can do is firing a signal to the server telling it to make an object, and not making the object than passing it as an argument in :FireServer().

Although i'd say that a hacky way to do it, pass the object, than basically create another object with same class and same properties and everything.

Ad

Answer this question