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

i dont know how to finish this script?

Asked by 9 years ago

so i've got this script but i have no idea how to finish it, it has to go into a door (part) and wait 60 seconds after it's clicked, then open, 30 seconds later, it closes.

heres the script:

function clicked() wait(60) -- wait a minute before opening -- door opens wait(30) -- given time before closing -- door closes end

script.Parent.ClickDetector.MouseClick:connect(clicked)

2 answers

Log in to vote
0
Answered by 9 years ago

first off, please use a code block when giving us code (press enter once, and paste you code in between the lines.) and this is not a request site. if you need more information on clicked events i suggest looking at videos or the roblox wiki! this page should help most http://wiki.roblox.com/index.php?title=API:Class/ClickDetector but without knowledge you should view videos on it

0
These kind of things go in comments not answers. drew1017 330 — 9y
Ad
Log in to vote
0
Answered by
iNicklas 215 Moderation Voter
9 years ago
door = script.Parent

function clicked()
    wait(60)
    door.Transparency = 0.5
    door.CanCollide = false
    wait(30)
    door.Transparency = 0
    door.CanCollide = true
end

script.Parent.ClickDetector.MouseClick:connect(clicked)

I'm not sure if it was this kind of thing, if its a door with 2 parts you need to make it change position.

Answer this question