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

How Do You Script A Door?

Could Someone Please Help Me Script A Door I Need It For A Game I'm Working On.

2 answers

✓ Accepted answer

Hi, This is the script and you need to put a click detector in, Please give me reputation!

doorIsOpen = false

door = script.Parent.Door -- change this to where your door is located.

button = script.Parent.Button -- change this to where your button is located.

 

function OpenOrCloseDoor()

    if doorIsClosed == true then

        --open the door

        door.CanCollide = true

        door.Transparency = 0  

    else

        -- close the door. 

        door.CanCollide = false

        door.Transparency = 1

    end
end

You should probably have an attempt first. Not many people want to help people that haven't even bothered.

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