I’m writing a saving outfit system and i want to save the character outfit as a whole string however i’m having issues with the name part, since the custom name may have magic characters, if a player uses a name with magic characters and wants to change it again they can’t cause it has magic characters, is there any way to prevent it stopping?
I don’t really want to share the whole script so i’ll make an example:
local outfitstring=“ShirtID|PantsID|Robert[Sister:Jessica]”
local newname=“Tony<3”
print(string.gsub(outfitstring,string.split(outfitstring,"|")[3],newname))
i want it to print
ShirtID|PantsID|Tony<3
but since the old name has magic characters it can’t replace the part of the string and it prints