Thanks for clarifying that, that was one of the issues in my methods! However whenever I set the attribute of the new string, it removes everything but alphabetical characters.
test1 is the string I manually set.
"helloworld" was suppose to be "helloworld2" | translated from "hello.world2"
Update, the module I was printing it through was cached since I was running this though command line.
If you’re looking to use the module code:
function module:subNonStringCharacters(str)
if typeof(str) == "string" then
local newString, replacedCharacters = string.gsub(str,"%W","");
return newString
end
end;