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

How do u do so you click a door and then it open and closes each time you click? [closed]

Asked by 10 years ago

Put script in Awnser plz.

0
I mean by a swivel door so it swivels around! masterninjajm 0 — 10y

Closed as Not Constructive by evaera

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
1
Answered by
war8989 35
10 years ago

Here's a simple script that opens and closes when clicked. Insert the script and a ClickDetector into the door part. Modify the script to your liking. EDIT: I didn't see your comment, remove the CanCollide and Transparency lines and change them to rotate the door. Use this page on the wiki for help: http://wiki.roblox.com/index.php?title=CFrame

door = script.Parent
open = false

door.ClickDetector.MouseClick:connect(function()
    if(open == false) then
        door.CanCollide = false
        door.Transparency = 0.5
        open = true
    elseif(open == true) then
        door.CanCollide = true
        door.Transparency = 0
        open = false
    end
end)
0
Thanks thats perfect! masterninjajm 0 — 10y
0
You're welcome! war8989 35 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

If you mean a sliding door then use the HansCo sliding door kit

http://web.roblox.com/HansCo-CFrame-Door-A-item?id=14704864

Its very simple to use. If you already have a door then the script might be usefull :P