How do I make it so if a player types a certain thing into a chat, it does something else?

The title shares it all. Basically, I’m trying to make it so a part’s CanCollide turns false after the player says something. How would I achieve that?
I’ve check the DevForum, but to no avail.

1 Like

You can use the Player.Chatted event and then check what the message is.

1 Like
2 Likes

Cool, but where would I put the script? (to both answers)

You can use a LocalScript located in StarterPlayerScripts. When the game runs, StarterPlayerScripts will give this script to every player.

Edit:
My mistake. For the code that @WheezWasTaken linked, use a Script in ServerScriptService.

2 Likes

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