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 11 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 11 years ago

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

01Click = 0
02script.Parent.ClickDetector.MouseClick:connect(onClicked)
03function onClicked(playerWhoClicked)
04    if Click == 0
05        script.Parent.CanCollide = true
06        script.Parent.Transparency = 0.5
07        Click = 1
08    else
09        script.Parent.CanCollide = false
10        script.Parent.Transparency = 1
11        Click = 0
12    end
13end
0
it gave me a error :( Iamverychill2 4 — 4y
Ad
Log in to vote
0
Answered by 11 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