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

Will this click door work?

Asked by 10 years ago

Will it work?

H = game.Workspace.Part

function onClick(Part)
H.Transparency = 0.5
H.CanCollide = false
wait(5)
H.Transparency = 0
H.CanCollide = true
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
  • Newbie at scripting here...

4 answers

Log in to vote
1
Answered by 10 years ago

Yep, seems to work. Although you may want to name your door something else, or put it into a model. Having it named as "Part" may confuse your script if other bricks are called Part.

0
Thanks gecko :D bloonblaster2000 55 — 10y
0
No problem :3 geckohero17 55 — 10y
Ad
Log in to vote
1
Answered by 10 years ago

Yes, I tried it, It should work

Log in to vote
1
Answered by 10 years ago

Insert a click detector into the part you put this script in and change line 11 to

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Log in to vote
0
Answered by 10 years ago
script.Parent.ClickDetector.MouseClick:connect(function()

Answer this question