- I would like to access the UniqueId not change it but just get the value
- I tried looking around but I couldn’t find any way of actually accessing the property
You can’t. It’s impossible. There is no POSSIBLE way to do it.
Why do you even want it btw?
It allows you to distinguish table entries from one another, for instance.
So far, there’s no method to obtain it.
what do you think would be the best way to do this
There isn’t any. It’s locked to the game and game only. I don’t even thing you canuse httpservice for this.
Is the best way to do this rn to just give each object in the game an attribute called UniqueId and just +1 to the value for each object?
depending on what you are doing, yes. Altough can you provide more context for what you are trying to achieve?
Basically I want each tool in my game to have a unique id as they have the same name
You can generate unique IDs with HttpService.GenerateGUID
:
You shouldn’t really use GUID’s as they are extremely long and take alot of data. Consider creating your own ID system altough GUID’s are the easiest way
I think that entirely depends on the context that you are using them. I wouldn’t consider 36 bytes a lot of data in most cases and I don’t think that’s a reason not to use them.
UniqueID’s aren’t really GUID’s honestly. It’s better if OP uses tick
to give an object a specific id as it’s ALWAYS unique and is also quite small.
Yea I agree that tick
would work in this case.
I’m a little confused on what you mean by this. If what I’ve read about UniqueID
is true, then it’s just a 128 bit number converted to a hex string which is the same thing HttpService.GenerateGUID
returns. They may not be generated the same way but they are similar, and I’d be surprised if someone managed to generate a duplicate GUID in a single session.
I have a module that can do this sort of thing if you still need it, if you want it, feel free to ask!
yeah Id love the module thanks!
Give me one moment! I need to make some checks for it first!