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: BindableFunction

Previous Thread :: Next Thread 
socccerstar is not online. socccerstar
Joined: 23 Aug 2008
Total Posts: 489
10 Sep 2012 11:03 PM
Okay, first let me make an assumption. I assume that LocalScripts cannot access the _G table. I feel like I remember testing this a looong time ago, but I cannot remember.

So, assuming that's true, would it be possible to create an element inside _G, then have a LocalScript access that element via a BindableFunction object? For example:

func = script.Parent --inside BindableFunction

function func.onInvoke(key)
return _G[key]
end

Which would essentially retrieve the value of _G to a LocalScript, correct?
Again, I haven't been on Roblox in several months, so I'm not up-to-date with all the changes probably made since, but this is what I remember, and would be useful in a project I have in mind. Correct me if I'm wrong.
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
10 Sep 2012 11:09 PM
When bindablefunction actually replicates (which it is set up to do, but last I tested it had not been implemented yet) yes, it will be possible to do that.

That doesn't make it a good idea though. You should only be performing abstract actions over the network with functions like that, for instance "reset the current level", not querying large pieces of data, which would be really slow.
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
11 Sep 2012 01:50 AM
But the function that is binded to the object would execute in the LocalScript, so no.
I tried this before to access data persistance from a LocalScript and it failed.
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
11 Sep 2012 04:10 AM
Why doesn't the >>>GLOBAL<<< table replicate to clients?
Report Abuse
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
11 Sep 2012 11:08 AM
I really should take a look at Bindable Functions, they look pretty interesting.
Report Abuse
noliCAIKS is not online. noliCAIKS
Joined: 08 Mar 2010
Total Posts: 917
11 Sep 2012 02:21 PM
You can simply make a protocol that detects the type of the value to send, creates the appropiate Value object, assigns the value, sets the name to something to use as an identifier and place it inside a model somewhere. Then you could just use the ChildAdded signal to recieve requests and communicate like that.
To prevent littering the DataModel in case of unexpected network errors, you could make the server sided script add things it sends to the Debris as a surefire way to add a timeout.
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