Chat controlled door

How to make a chat controlled door.

by FreakingHulk

Author Avatar

Hey! Hulk here. Just wanted to thank you guys for the likes and awards! I have a new tutorial coming out soon that I think will be useful to a lot of people.


Hey! Thanks for checking out my tutorial. I'm FreakingHulk, and I'm going to

show you how to make a chat controlled door.

Creating a Door

Insert a new Part into the workspace, and scale it how you like. The name doesn't matter.

Scripting the Door

Now it's time to code our door. Right click on your door, and insert a Script.

Delete the "print("hello, world!")", then paste this code in.

local door = script.Parent

-- Make sure the door is anchored.

door.Anchored = true

function open()

    door.Transparency = 1

    door.CanCollide = false


function close()
    door.Transparency = 0

door.CanCollide = true


Okay! So what this is doing is making functions that the game calls when a player

says a certain word(s) in the chat. When a player says "open door", the door will open.

When they say "close door", the door will close.

-- This block will make a chat message open/close the door.



        local message = msg:lower()

        if message == "open door" then



    if message == "close door" then





Make sure these code blocks are in the same script, or it will error and crash. Other than that, it should work! I've used this method in multiple games, and

it has never failed me!

Thanks for reading! And always remember... CODE ON!

View in-game to comment, award, and more!