generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: REMOTE FUNCTIONS [2]

Previous Thread :: Next Thread 
TextSoaked is not online. TextSoaked
Joined: 04 Sep 2015
Total Posts: 1040
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
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
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
TextSoaked is not online. TextSoaked
Joined: 04 Sep 2015
Total Posts: 1040
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
TextSoaked is not online. TextSoaked
Joined: 04 Sep 2015
Total Posts: 1040
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
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
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
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
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
TextSoaked is not online. TextSoaked
Joined: 04 Sep 2015
Total Posts: 1040
28 Jan 2017 01:08 PM
so there's no way to protect data interaction between the client and server?


Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
28 Jan 2017 01:08 PM
what kind of data is it and what is it used for?


Report Abuse
TextSoaked is not online. TextSoaked
Joined: 04 Sep 2015
Total Posts: 1040
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
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
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
TextSoaked is not online. TextSoaked
Joined: 04 Sep 2015
Total Posts: 1040
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
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
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
TextSoaked is not online. TextSoaked
Joined: 04 Sep 2015
Total Posts: 1040
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
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image