In my code I have a “(” but it’s expecting it to be finished with another ) so “()” but I only want the one (. How do I do that? Same thing with square brackets, and other Magic Characters. I'm replacing the ( with the () in a gsub
script.Parent.TextLabel.Text = string.gsub(script.Parent.TextLabel.Text, "(", "()")
(
is a magic character used for string capturing, if you want to use it as normal character you need to prefix it with %
:
script.Parent.TextLabel.Text = string.gsub(script.Parent.TextLabel.Text, "%(", "()")