Dispite our god, David Bazooka’s clear signs telling me to stop I have managed to create a module which can take an instance and write down all its properties into a list. My roblox studio straight up broke over six times while making this, like scripts wouldn’t run at runtime or I’d crash or scripts would work when they by all means should of been broken
Use cases:
- Saving the lighting’s properties for like, a scene change. EG your teleporting from one zone to another zone and these zones have different lighting
- Idk I only made this for the above reason. (Would it of been easier to do it manually? Certainly, but now that we have this technology it’s easier for everyone else!)
How it works TL;DR!
- So some nice folk, I genuinely have no clue, uploaded all the of roblox’s classes to github in Json.
- I copy pasted the 94142 lines into a Module Script which is called “Raw Data”. This module decodes the json.
- This Raw data then gets processed by another module called “PropertyIndex” which spits the chotic mess of a list into a ‘neater’ an index of properties and tags. --This was origionally code by @DrWhoInTARDIS but I’ve changed it pretty much completely
- TheCycleEndsAtTheRootTheCycleEndsAtTheRootTheCycleEndsAtTheRootTheCycleEndsAtTheRoot
- Now comes the star of the show
- gets an object and then checks it with its Property Index. It runs through all the items in the property index and checks if its safe to check those properties. (Sometimes you won’t have permission too)
- If it’s safe to check those properties then will grab the property from the given instance and write it down onto a list.
- Now that it’s got it’s list of properties written down hands it back to you in a very formal manor
(how sweet of
:♥ ♡ ♥ ♡ ♥ ♡ )
It’s probably going to become outdated in like, a year because I’m unable to get RBX’s dump file in order to get the classes. For more info on the whole class file stuff look here.
Roblox should probably add a feature like this to the API but it’s not a priority so thats why there a psychos like me to do it instead.
Back on topic, Here is the model and a game if you want to check it out.
How am I going to use this script?
ObjectPropertiesToList = require(ObjectPropertiesToList)
print(ObjectPropertiesToList(game.Lighting))
Known issues: Anything which can have a two way effect seams to be kinda broken, so like position/orientation and CFrame seam to conflict. And attachments/welds in general seam to be very broken with this script.