Help with filtering local string

I want to make a GUI where if you type a bad word in the gui then click on a button, the string gets filtered
Logically, this would happen by a RemoteFunction, the LocalScript sending the string to the server, the server filtering the string then sending it back to the player’s TextBox. How could I achieve that?

There is actually a built in Roblox function that will filter strings. It’s a lot to explain so I will link the documentation here: