Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Will this click door work?

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

✓ Accepted answer

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.

2 comments

0

Thanks gecko :D

0

No problem :3

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

script.Parent.ClickDetector.MouseClick:connect(onClicked)
script.Parent.ClickDetector.MouseClick:connect(function()

This discussion is preserved as it was. New answers, comments, and votes are closed.