Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How Do You Script A Door?

Asked by 10 years ago

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

2 answers

Log in to vote
0
Answered by 10 years ago

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

Ad
Log in to vote
1
Answered by
lokkut 20
10 years ago

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

Answer this question