How can I fetch identical strings concatenated with 1 and so on at the end through this dictionary
Basically the identical string is the entity's classname: "keyframe_rope" or "move_rope"
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1216133789550510140/image.png)
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1216133789810430002/image.png)
4 Replies
are you looking for basically every instance of
keyframe_rope_n
in a dictionary where n
is unknown?
would work with the dictionary itself and prevent you just querying every key
this assumes that every index is in there with no gaps
or you could do this:
which would just broadly get them all regardless of that, whilst being a bit easier to read :catshrug:yes
I need to make it so I can identify both att0 and att1
yup
would do that
it's a little inefficient because you're doing a string comparison on the entire dictionary, but it would get everything that starts with a given name
if you know 100% that
att2
would only exist if att1
also definitely existed you could use the first solution I posted which would be a bit more efficient
or if you know 100% that the maximum number of any instance is say 10, you could just do a query for all 10 in a for loop, which may or may not be a bit more efficient too, ymmvI'm only doing this because roblox has trouble identifying things if they aren't named a specific name this should work would this work?