Is it possible to find just part of a string? Like if the string is "58", are you able to assign "5" to a variable and "8" to another variable?
You would need to learn string manipulation here. https://developer.roblox.com/api-reference/lua-docs/string
If its only a two digit number than you could do something like:
local first_var local second_var local string_to_parse = "58" -- Get the first character, assign it to first_var first_var = tonumber(string_to_parse:sub(1,1)) -- Get the second character, assign it to second_var second_var = tonumber(string_to_parse:sub(2)) -- Convert the variables from strings to numbers -- Add the numbers together print(first_var + second_var)
Output: 13
My sample was just an example so do not think of it as a smart way of approaching what you want. Study the different methods of string manipulations in the link I provided.