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: Assign multiple things the same value?

Previous Thread :: Next Thread 
AutoCarrot is not online. AutoCarrot
Joined: 24 Oct 2013
Total Posts: 5588
12 Aug 2016 05:49 PM
without iterating through a table?

Say I wanted to do:

Blur.Enabled, GUI.Visible, IDK.WhetEves = true

Could I do that?

Just feed up of listing things


WolfgangVonPrinz // Private Drive - Residents Only
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
12 Aug 2016 05:52 PM
Nope, you'll have to do true, true, true
Report Abuse
AutoCarrot is not online. AutoCarrot
Joined: 24 Oct 2013
Total Posts: 5588
12 Aug 2016 05:53 PM
Ugghhhhhhhhhh I do it loaddsssssss thoooouuuuuggggghhhhhh


WolfgangVonPrinz // Private Drive - Residents Only
Report Abuse
Objectly is not online. Objectly
Joined: 18 Jul 2016
Total Posts: 210
12 Aug 2016 05:54 PM
Everything in ROBLOX is actually a table.

Behind everything in ROBLOX is OOP which uses tables, known outside of ROBLOX as objects. You can have a folder of values and loop through their properties by ensuring they are the type of object you want via the :IsA method.
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
12 Aug 2016 05:55 PM
"Everything in ROBLOX is actually a table." Uh, no.

Report Abuse
Skellobit is not online. Skellobit
Joined: 13 Apr 2016
Total Posts: 12758
12 Aug 2016 05:56 PM
"Everything in ROBLOX is actually a table."

> print(type(6))

Formerly ToxicDominator - add 17,509 posts
Report Abuse
AutoCarrot is not online. AutoCarrot
Joined: 24 Oct 2013
Total Posts: 5588
12 Aug 2016 05:57 PM
@Objectly, I knew about OOP, but I don't quite understand the next sentence about the folder.


WolfgangVonPrinz // Private Drive - Residents Only
Report Abuse
AutoCarrot is not online. AutoCarrot
Joined: 24 Oct 2013
Total Posts: 5588
12 Aug 2016 05:58 PM
I also think he is referring to objects, such as a frame, which is a table of properties then rendered (Or at least, that's what I understand it to be.)


WolfgangVonPrinz // Private Drive - Residents Only
Report Abuse
Objectly is not online. Objectly
Joined: 18 Jul 2016
Total Posts: 210
12 Aug 2016 06:10 PM
Forgive me for improper use of the word "everything". I did not mean it in that sense but in the fact that the objects, like frames, roblox has are tables.
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
12 Aug 2016 06:14 PM
still wrong.
Report Abuse
AutoCarrot is not online. AutoCarrot
Joined: 24 Oct 2013
Total Posts: 5588
12 Aug 2016 06:15 PM
What's he wrong about?



WolfgangVonPrinz // Private Drive - Residents Only
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
12 Aug 2016 06:17 PM
They're not tables in any way. They're objects, more than likely an object that wraps a C++-sided class.
Report Abuse
Xsitsu is not online. Xsitsu
Joined: 28 Jul 2009
Total Posts: 2921
12 Aug 2016 06:20 PM
They're "userdata", which you can kind of substitute as tables in a few scenarios. For example, you can use the [] operator to index different values, but you can't iterate through them with pairs().
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
12 Aug 2016 06:27 PM
You can "index" any value if it has the __index metamethod, userdata is no different. And in Lua 5.2+ (or 5.3) they have the __pairs metamethod which actually is called when pairs is called on the object.
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
12 Aug 2016 06:27 PM
on the object or value*
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