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
 

Is there any way of getting the properties of an instance

Previous Thread :: Next Thread 
Zylez is not online. Zylez
Joined: 26 Mar 2016
Total Posts: 417
08 Nov 2016 01:25 PM
I want to transfer all properties from an unknown instance to another. I would like to know if there is any way to obtain the properties and apply them to another. For example:

props = GetProperties("BasePart")
for i = 1, #props do
workspace.Part1[props[i]] = workspace.Part2[props[i]]
end


Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
08 Nov 2016 01:43 PM
doing this:
part[x]
Will get children, not properties.
Report Abuse
Zylez is not online. Zylez
Joined: 26 Mar 2016
Total Posts: 417
08 Nov 2016 01:46 PM
Doing Part["Position"] will get the position of the part.


Report Abuse
VoidFrost is not online. VoidFrost
Joined: 14 Oct 2011
Total Posts: 1188
08 Nov 2016 01:50 PM
You can't.
Report Abuse
Zylez is not online. Zylez
Joined: 26 Mar 2016
Total Posts: 417
08 Nov 2016 01:52 PM
So why has roblox not thought about this before? There is even a suggestion with a lot of supporters that was posted 5 years ago: https://forum.roblox.com/Forum/ShowPost.aspx?PostID=43343174

How come this important feature has not been added yet?


Report Abuse
UFAIL2 is not online. UFAIL2
Joined: 14 Aug 2010
Total Posts: 6905
08 Nov 2016 01:53 PM
The only way I can think of doing it is to either compile a list (or parse the wiki[1]) of all the properties in the game and when faced with an unknown instance to just attempt to read every property. Create a metatable and store the results of all the properties for that instance and look it up.

[1] wiki.roblox.com/index.php?title=Category:Class_properties
Report Abuse
UFAIL2 is not online. UFAIL2
Joined: 14 Aug 2010
Total Posts: 6905
08 Nov 2016 01:56 PM
My bad you could just parse the relevant wiki page for the instance instead of the whole list.
Report Abuse
Zylez is not online. Zylez
Joined: 26 Mar 2016
Total Posts: 417
08 Nov 2016 01:58 PM
I know there are some modulescripts for getting properties but still, I can't believe roblox never taken it into consideration. I expected it to be obtainable with getfenv


Report Abuse
OzzyFin is not online. OzzyFin
Joined: 07 Jun 2011
Total Posts: 3600
08 Nov 2016 01:59 PM
how would environments have anything to do with objects' properties
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
08 Nov 2016 02:16 PM
pretty sure the objects are controlled using a function for index and when you try to get all of the items it will not show up because it is not in the table but rather a reference from the index function
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