Welcome to the Forums!
Join thousands of other Roblox members with a free account.
Create Forum Account

Scripting: possible to store an arraylist in a "value"

  • This website was created by Roblox members to replace the official forums (because Roblox shut them down) Join us if you like Roblox!

OldEvilOne

New Member
Reputation: 0 / 0 / 0
Feb 19, 2021
1
0
1
Roblox
OldEvilOne
I would like to make an arraylist, stored as part of a value that is a child of a model.
I would like to use something like 'StringValue' but then the counterpart for arraylists.
But... wat is the type of value I need to use for this? (and is this even possible)?

Otherwise I think I'll need to make a script that is activated (when a tool clicks/activates on it).
But I would prefer the other approach as a lot of models/parts/scripts wil need to use this arraylist.

Tnx for the help already.
 

CallMeKY

Moderator
Ultra
Reputation: 6 / 0 / 0
Feb 25, 2018
1,492
39
607
113
Maine, USA
Roblox
CallMeKY
Discord
CallMeKY#5012
I would like to make an arraylist, stored as part of a value that is a child of a model.
I would like to use something like 'StringValue' but then the counterpart for arraylists.
But... wat is the type of value I need to use for this? (and is this even possible)?

Otherwise I think I'll need to make a script that is activated (when a tool clicks/activates on it).
But I would prefer the other approach as a lot of models/parts/scripts wil need to use this arraylist.

Tnx for the help already.
To force that way you could probably JSON encode it, add it to a string value, then JSON decode it inside the scripts that use it. A more efficient way (not using HTTP calls) would be to use a global variable, which wouldn't replicate to the client, or use remotes/bindables.