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
 

Bug or is this supposed to happen?

Previous Thread :: Next Thread 
TwoOfFive is not online. TwoOfFive
Joined: 26 Mar 2011
Total Posts: 2532
15 Jan 2015 04:03 PM
When I do something like this

function name()
Thing = true
Variable1 = "Hello"
if Thing == true then
Variable1 = "Goodbye"
end

I just made a global variable, but it's not working inside that If statement

If I run that there are two Variable1s. One that says Hello and one that says Goodbye.

Is this a bug?
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
15 Jan 2015 04:14 PM
your just overwriting one variable with another value
Report Abuse
TwoOfFive is not online. TwoOfFive
Joined: 26 Mar 2011
Total Posts: 2532
15 Jan 2015 04:27 PM
No
It doesn't overwrite

That's the problem here.
All it does it make two variables with the same name.
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
15 Jan 2015 04:27 PM
thats overwriting it
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
15 Jan 2015 04:30 PM
Maybe it has to do with the scope.

How do you know it does this?

Proof?
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