Unique Ids Module | V1.1

Hello!

Not to long ago I noticed that parts and stuff in roblox had a property known as UniqueId, only thing is you are unable to access this property, so I made a module for it!


Get It


Setup

    1. Take the module and put it where ever you want.
    1. Use robloxs Require function in order to use its code require(pathToModule).
    1. Call any function within the module, and enjoy!

Properties

  • KeepUniqueId: This property is a bool, when set to true, cloning/duplicating a part will make it gain a new UniqueId. This also applies if you import an object which has the same UniqueId as another Instance. When set to false, the Instance will keep its UniqueId.

Methods

  • GenerateId: Returns an UnqiueId.
  • AddUniqueId: Adds a UnqiueId to an Instance.
  • GetLocalInstanceFromUniqueId: Gets an Instance that has the provided UnqiueId that is a children of the passed Location.
  • GetGlobalInstanceFromUniqueId: Gets an Instance with the Provided UniqueId, Unlike the local version of this function, it scans the whole game for the Instance.
  • AutoAddUniqueIdsForLocation: When set to Enabled will add UnqiueIds automatically to any Descendant of the provided Location.
  • AutoAddUniqueIdsGlobally: When set to Enabled will add UniqueIds automatically to any Descendant of Game, meaning everything.
  • DisableAllAutoAdds: Disables any AutoAdds that were created.

If you have any feedback please feel free to let me know! Just trying to make life easier around here lol~
~ Frodev

4 Likes

I think the fine print for this should be updated with a small disclaimer; I initially thought this was a module for the property itself, but it’s an attribute-based thing (though, the AutoAdd methods and KeepUniqueId property should’ve given me some hints)

2 Likes

This module has been very useful for my viewport renderer! one suggestion i have is a function to return every UniqueId currently applied (either locally or globally)

1 Like

Actually thats a good idea! Ill try it out!

1 Like