So basically, I have been looking around for a method/function that can match the string and then return the string it found. Just so I can find it and use it as a variable.
Here's my code:
1 | for v, k in pairs (items) do |
2 | print (v, k) |
3 | for _, i in pairs (case:GetChildren()) do |
4 | if string.match(i.Name, v) then |
5 | local Chance = string.gmatch(i.Name, v) |
6 | chances [ v ] = case [ Chance ] .Value * 10000 |
7 | end |
8 | end |
9 | end |