Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How would I do this?

Asked by 9 years ago

So, I asked my friend to make me a list for a game we're making for all the items we'll be selling in our shop, but when I asked for it, it wasn't what I was expecting and he gave me this:

Item - Torch
Price - 50
Object - game.ServerStorage.Torch

Item - RC Car
Price - 200
Object - game.ServerStorage.RCCar

Item - Toy Gun
Price - 150
Object - game.ServerStorage.ToyGun

Item - Teddy
Price - 20
Object - game.ServerStorage.Teddy

--[[Only part of it]]--

This list he made has over 200 items and there is no way either of us are going to convert that into an actual table! I know this would be possible using string.find or some other string manipulation, but how would I make a loop that iterates through all of them and so I can get each of the values but I not the object value?

Answer this question