Need help making multiple scripts with similar code run correctly

im trying to make this system where when a player joins a suitcase for them appears, i have preset 50 suitcases that are invisble and when someone joins all of the suitcases appear and sometimes if someone leaves they all disappear at the same time. is there any way to only get one suitcase to spawn in and be removed at a time instead of all of them at once?

my current code:
image
every script just has line 2 changed to match its suitcase name

Id suggests making 1 script which handles all your suitcase.
In your model add an attribute to who owns the case.

When someone joins find a case whit no owner and give it to such player by changing the case owner attribute and then you can make that case visible.

Once they leave find their case reset their attribute to no one and make it invisible again.

could you give me an idea on how to turn an attribute into giving a suitcase an owner? im fairly new to scripting and havent used attributes yet

take all your case and put them in a folder
Add an owner attribute to them and set it to nil
once someone joins loop in your case folder and finds one whit a nil owner and set that value to them then make them visible
once someone leaves loop in your case folder for a case witch as their name
as owner and reset it to nil and make it invisible

you can use the get and set attribute for this

im currently trying to change the attribute into the newest players username but the output tells me instance is not a supported attribute type, im sure im probably doing something wrong so please let me know
my current script:
image