Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to find and remove a word from a string?

The title says it all. I've looked on the WIKI and it's not really explained too well which is why I've come to you guys, you seem to make sense of things.

But I've made a Squad Gui in which players can join a squad etc... But when they leave their name is still left their in the squad members box. All wanted to know is how to find a specific word in a string of the players name's I've got and how to remove that word. I can do the rest myself.

Thanks!

1 answer

✓ Accepted answer

string.gsub

To remove something from a string, it is as simple as subbing it out.

str = str:gsub("RemoveMe", "");

1 comment

0

Oh well this makes me look stupid. Haha but thanks a lot it's helped me massively!

This discussion is preserved as it was. New answers, comments, and votes are closed.