First convert the number into a string using tostring() and then use either string.find(), to find a certain part of the number and extract it. I recommend using string.sub though. Here is a link to string.sub: string | Roblox Creator Documentation
If you then need it as a number again use tonumber() to convert your edited string back into a number.
In your case, as I read further on the thread, you are trying to do a conversion system with 5000 alone.
so here is your solution.
local 5000alone = string:sub(1, #str-3)
– Create a variable in which you Perform your operations on the variable we just created (example = local convertednumber = 5000alone/10
– add origin number back to variable (convertednumber)
Happy to help - CyberWizard