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

How could I make a door clickable then it will open?

Asked by 10 years ago

I havent tried anything yet i just wanted to know how to make a door clickable then it will open, stay open till i click it again then it closes

** UPDATE:**

Please provide a script for it, I have the door all made and I just need the script and i need to ask, Do you need to use hinges, If so which ones?

2 answers

Log in to vote
1
Answered by 10 years ago

Put a ClickDetector inside the door brick along with this script.

Click = 0
script.Parent.ClickDetector.MouseClick:connect(onClicked)
function onClicked(playerWhoClicked)
    if Click == 0
        script.Parent.CanCollide = true
        script.Parent.Transparency = 0.5
        Click = 1
    else
        script.Parent.CanCollide = false
        script.Parent.Transparency = 1
        Click = 0
    end
end
0
it gave me a error :( Iamverychill2 4 — 4y
Ad
Log in to vote
0
Answered by 10 years ago

Please answer and if possible please do provide a script so it helps me rewrite it more and give credit to the maker, Thanks

Answer this question