How would I go about showing a script that a folder with belongs to a certain player, I tried doing this another way by naming the folder the players name, but this caused many issues. I also thought about storing it in the player/character, but it isn't very secure. Any suggestions?
Hey.
There's nothing really "insecure" about parenting a folder to the player; in fact, it's a pretty common method to storing player data. Although if you're opposed to it, here are a couple of other methods you can use...
1) You can create a module and keep a dictionary in it with all of the player data. It can be indexed with module.Data[game.Players.playername]
. I recommend this method because it's pretty easy to do and allows you to store any data without having to create a specific value object. This can also be achieved using a normal table, but I'm assuming you would prefer a module because it can be accessed from other scripts without any hassle.
2) If you're opposed to parenting all of your objects to a folder named in correlation with players' names, you can parent them to an ObjectValue with its Value property set to the player object. This is also a pretty easy method to use, and to index it, you would have to iterate through the folder of values and find the one with the value that matches the player.
Remember to upvote and mark as answered if this helped you! If you see any false information, just let me know.
Thanks, Sam