RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"script for a part so when you say "damien" it makes the part disappear"
To make a part disappear when a player says "damien," you can use a Script that listens to the player's chat messages and checks if the message contains the word "damien." If it does, the script will make the part invisible or remove it from the Workspace. Here's an example of a server-side Script that does this: ```lua local part = game.Workspace.Part -- Replace with the actual path to your part game.Players.PlayerAdded:Connect(function(player) player.Chatted:Connect(function(message) if message:lower() == "damien" then part:Destroy() -- This will remove the part from the game -- Alternatively, you can make the part invisible instead of destroying it: -- part.Transparency = 1 -- part.CanCollide = false end end) end) ``` Make sure to place this Script in the `ServerScriptService` and replace `game.Workspace.Part` with the actual path to the part you want to affect. The script listens for the `PlayerAdded` event to connect to the `Chatted` event of each player. When a player chats, it checks if the message is "damien" (case-insensitive) and then either destroys the part or makes it invisible and non-collidable.