So basically i want to have individiual datas for characters into a place and acess it whenever i need to. is this the best way to do it? because it currently works but i kinda wanna also do type checking aswell so it feels more organised
im kinda bad at explaining this hopefully you get the point
an example would be like charactes in games where diffrent characters would have diffrent stats
If you are referring to grabbing default stats for NPCs or stats for gear from a module script, then I would say that’s a good use of it. I’m actually currently doing this with a game I’m working on and it definitely helps me organize my code, cause I can just easily retrieve the data via → gameInfo["Bacon Burger"].Energy
As for checking the type of data it is, you can just use type() or typeof() after you retrieve it. However, I’m not exactly sure why you would need to do this because I would assume that you wouldn’t be changing the data type or even changing the data at all in the module script.
Yeah, it is totally right, you can organize your code with this, if you want a good typo in your game else you don’t have to as you feel it’s better for you, like that, though it’s perfect, so yeah all good.