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 » Scripting Helpers
Home Search
 

Re: Can a script get info from an other script?

Previous Thread :: Next Thread 
qdhxx is not online. qdhxx
Joined: 02 Jul 2010
Total Posts: 56658
20 Aug 2013 06:35 PM
If script 1 says that
"i = 1"

can script 2 find it and use it?


Report Abuse
lupine is not online. lupine
Joined: 24 Jun 2008
Total Posts: 3561
20 Aug 2013 06:36 PM
_G.i = 1

-- second script now, trickery

print(_G.i) --> 1


_G. Stands for global. :3
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
20 Aug 2013 06:36 PM
Script one:
_G.i = 1

script two:

print(_G.i)

>1


Use global variables.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
20 Aug 2013 06:36 PM
Or, stringvalues
Report Abuse
lupine is not online. lupine
Joined: 24 Jun 2008
Total Posts: 3561
20 Aug 2013 06:37 PM
FORGOT TO MENTION

_G in a localscript (so long as it's placed correctly) will only find global variables inside that PLAYER

_G in a normal script can find all global values so long as they're not in a localscript.
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
20 Aug 2013 06:37 PM
@cnt
Why would anyone use Value instances when you can use Global Variables?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
20 Aug 2013 06:38 PM
"_G in a localscript (so long as it's placed correctly) will only find global variables inside that PLAYER"
Well, that's not the literal meaning.
It's more like:

_G in a localscript will only find global variables stored on the client. (localscripts anywhere per computer, if that makes sense)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
20 Aug 2013 06:39 PM
Global Variables are sometimes glitchy.
StringValues CAN'T really be glitchy.
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
20 Aug 2013 06:40 PM
Value Instances*

All of your problems can't be solved by just stringvalues.
Report Abuse
lupine is not online. lupine
Joined: 24 Jun 2008
Total Posts: 3561
20 Aug 2013 06:41 PM
YES THEY CAN D:

it's okay stringvalue, he didn't mean it.

he's just a mean, confused man

shh, shh, don't cry
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
20 Aug 2013 06:41 PM
So? There are other types of values
Report Abuse
ColdSmoke is not online. ColdSmoke
Joined: 02 Jan 2012
Total Posts: 5784
20 Aug 2013 06:41 PM
I use sting variables because I understand them

and I never knew about _G

Lobster in disguise
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
20 Aug 2013 06:44 PM
"So? There are other types of values"

"Value Instances*

All of your problems can't be solved by stringvalues"

You are super annoying and I'd very much enjoy it if you'd stop spamming this forum with your idiocy and usless posts.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
20 Aug 2013 06:45 PM
"You are super annoying and I'd very much enjoy it if you'd stop spamming this forum with your idiocy and usless posts."
You are really stupid, noob, get out arrogant idiot who thinks it can script better than me.

StringValue
NumberValue
IntValue
ObjectValue
CFrameValue
Vector3Value
etc

you stupid worthless noob
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
20 Aug 2013 06:49 PM
You, my sir, are a terrible reader. How about you read my post carefully before you post again.

"Value Instances*

All of your problems can't be solved by stringvalues"
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
20 Aug 2013 06:49 PM
You, sir*
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
20 Aug 2013 06:50 PM
It's not that I'm a bad reader, it's that I get too bored to continue reading a full post.
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
20 Aug 2013 06:52 PM
You said:
stringvalues

I corrected that with:

Value Instances*

Which cover BoolValues, NumberValues, CFrame, Vector3, etc.

And followed up with:

All of your problems can't be solved by stringvalues

Report Abuse
qdhxx is not online. qdhxx
Joined: 02 Jul 2010
Total Posts: 56658
20 Aug 2013 06:53 PM
Thanks.

Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
20 Aug 2013 06:55 PM
"All of your problems can't be solved by stringvalues"
They can, but it will require more work.
Report Abuse
qdhxx is not online. qdhxx
Joined: 02 Jul 2010
Total Posts: 56658
20 Aug 2013 06:55 PM
ok stop arguing bby

Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
20 Aug 2013 06:58 PM
I'm not arguing, I'm telling him facts.
Report Abuse
lupine is not online. lupine
Joined: 24 Jun 2008
Total Posts: 3561
20 Aug 2013 06:58 PM
Arguing doesn't work, obviously. Just stop.
Report Abuse
qdhxx is not online. qdhxx
Joined: 02 Jul 2010
Total Posts: 56658
20 Aug 2013 06:59 PM
You're not telling him facts, you're arguing.
/mute all

Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
20 Aug 2013 07:08 PM
CNT.
SHUT UP
AND JUST READ THE ENTIRE POST.
AHHH YOU'RE SO ANNOYING.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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