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: Best way for Variables With FE?

Previous Thread :: Next Thread 
skppiy4000 is online. skppiy4000
Joined: 09 Oct 2008
Total Posts: 1945
23 Jun 2017 04:23 AM
Say like I wanna get the variable "Stamina" from the server and have it sent over the client for them to read


I want the client to send a request and the server send back information and then the client can use it like



local energy = Whatevertheserversent
Report Abuse
skppiy4000 is online. skppiy4000
Joined: 09 Oct 2008
Total Posts: 1945
23 Jun 2017 04:32 AM
I can't figure out how to get the variables to the client and read them
Report Abuse
ScripterTutorials is not online. ScripterTutorials
Joined: 01 Sep 2013
Total Posts: 284
23 Jun 2017 04:34 AM
Try using remotefunctions


-- roblox chat syst##
Report Abuse
skppiy4000 is online. skppiy4000
Joined: 09 Oct 2008
Total Posts: 1945
23 Jun 2017 04:36 AM
But how do i use the variables on the client once I get them?

for example I wanna send Stamina and Max Stamina over to the client..

How would if possible I make it so once I get the variables


local Stamina = val1

local StaminaMax = val2
Report Abuse
ScripterTutorials is not online. ScripterTutorials
Joined: 01 Sep 2013
Total Posts: 284
23 Jun 2017 04:42 AM
Remote functions are used to pass information from the server to the client.


When the client invokes the server, the client script will then yield until server finishes with the invokation. The Server can then return values back to the client, for it to use.

Go to the RemoteEvents and RemoteFunctions wiki.


-- roblox chat syst##
Report Abuse
skppiy4000 is online. skppiy4000
Joined: 09 Oct 2008
Total Posts: 1945
23 Jun 2017 04:45 AM
You are not fully reading my text unless im being 100% stupid, also stop refering me back to the remotefunctions and remote events wiki please, I understand that they exist, but how do I USE the variables once I send them.


I'm have trouble grasping on how to use the sent variables once I receive them
Report Abuse
skppiy4000 is online. skppiy4000
Joined: 09 Oct 2008
Total Posts: 1945
23 Jun 2017 04:48 AM
Actually nvm I have a workaround
Report Abuse
ScripterTutorials is not online. ScripterTutorials
Joined: 01 Sep 2013
Total Posts: 284
23 Jun 2017 04:52 AM
local var1, var2 = remoteFunction:InvokeServer()

print(var1)
print(var2)
Report Abuse
ScripterTutorials is not online. ScripterTutorials
Joined: 01 Sep 2013
Total Posts: 284
23 Jun 2017 04:53 AM
In the server script, just make it return the values you want


-- roblox chat syst##
Report Abuse
skppiy4000 is online. skppiy4000
Joined: 09 Oct 2008
Total Posts: 1945
23 Jun 2017 04:56 AM
local var1, var2 = remoteFunction:InvokeServer()

print(var1)
print(var2) Thank you!!! thats what I wanted the other one I understood perfectly.
Report Abuse
ScripterTutorials is not online. ScripterTutorials
Joined: 01 Sep 2013
Total Posts: 284
23 Jun 2017 05:00 AM
I was confused on what you were asking, my fault.


-- roblox chat syst##
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