Unfinished capture

Hello, i’m writing a code that searches if a string has a specific face, and if so, does somethings.
The problem is that i’m getting the ‘unfinished capture’ error in some of them.

Script

--The faces before this one works, and they are (XD, D:, :/)
elseif MS:match("B(") then --Error 'unfinished capture'
	--Do stuff

I tried searching around but i couldn’t find something specific for this kind of error.
Thanks for reading.

some characters are considered to be “magic characters”, and behave different in strings, you can find the 12 here:

try putting a % before it to let roblox know you’re just looking for a normal bracket, and see if this works:

MS:match("B%(")
2 Likes

Thank you a lot, it works!
Hope you have a nice day

2 Likes

I’m glad, you have a nice day too :slight_smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.