|
| 28 Jan 2017 01:01 PM |
For some apparent reason, roblox studio doesn't let you pass an object argument through remote functions from client to server?
I'm fully aware of the limitations: "An instance that's only visible to the sender (local parts, descendants from the ServerScriptService, ...) will be replaced with nil."
But is there no other way to do this?
|
|
|
| Report Abuse |
|
|
|
| 28 Jan 2017 01:02 PM |
you can send objects, but only if they're visible to both the client and server; otherwise, send properties
|
|
|
| Report Abuse |
|
|
|
| 28 Jan 2017 01:04 PM |
This is about the folder from yesterday, where there are String objects inside the folder that I want to pass as an argument to a remote function in workspace
Is anything from the client considered to be "only visible to the sender"?
|
|
|
| Report Abuse |
|
|
|
| 28 Jan 2017 01:05 PM |
And yea, converting them to a table and unpacking it into objects in the server works, but I'm looking for a way to send the obj directly
|
|
|
| Report Abuse |
|
|
|
| 28 Jan 2017 01:06 PM |
yeah things in PlayerGui, the mouse, etc
since you're wanting to pass the StringValues to the client anyway, why are you so worried about security? they would have access to them once you pass them/their properties
|
|
|
| Report Abuse |
|
|
|
| 28 Jan 2017 01:07 PM |
well you can't send the object directly there's workarounds but in the end it's not necessary
|
|
|
| Report Abuse |
|
|
|
| 28 Jan 2017 01:08 PM |
so there's no way to protect data interaction between the client and server?
|
|
|
| Report Abuse |
|
|
|
| 28 Jan 2017 01:08 PM |
what kind of data is it and what is it used for?
|
|
|
| Report Abuse |
|
|
|
| 28 Jan 2017 01:11 PM |
A leaderboard alternative that takes a player's table stored within data stores and coverts it into a folder obj w/ nested folders and separate value objects for strings/numbers/bools etc, to take advantage of the object events,and compresses a copy of the folder back into a table for storage when saving
|
|
|
| Report Abuse |
|
|
|
| 28 Jan 2017 01:14 PM |
okay, so why do you need to send the folder object? can't you just send a dictionary of individual values (even if it's necessary)?
if the leaderboard is changed on the client, the server won't see that so you can still access the leaderstats from the player and have the real values
|
|
|
| Report Abuse |
|
|
|
| 28 Jan 2017 01:15 PM |
A clone of the hud is created each time a player joins, and is connected to the player's folder in SS before moving the hud to the playergui
|
|
|
| Report Abuse |
|
|
|
| 28 Jan 2017 01:18 PM |
textLabel.Text = remoteFunction:InvokeServer("Kills")
when the remote function is invoked, return the number of whatever is specified and set that as the text?
|
|
|
| Report Abuse |
|
|
|
| 28 Jan 2017 01:22 PM |
I just connected the .Changed events to the GUIs beforehand, it's a lot easier than setting up remote functions for each value
|
|
|
| Report Abuse |
|
|
|
| 28 Jan 2017 01:24 PM |
I didn't mean set one up for each value, I mean use one remote and check the value specified; in this case it's "Kills" so the amount of kills would be returned
you can use the same remote with "Deaths" as an argument or whatever else
|
|
|
| Report Abuse |
|
|