1 | script.Parent.Touched:connect(Touched) |
2 | function onTouched(hit) |
3 | script.Parent.Parent.Door.Transparency = 1 -- an invisible door |
4 | script.Parent.Parent.Door.CanCollide = false -- a walkthroughable door |
5 | wait( 3 ) |
6 | script.Parent.Parent.Door.Transparency = 0.3 -- a partially visible door |
7 | script.Parent.Parent.Door.CanCollide = true -- a door you can't walk through anymore |
8 | end |
9 | script.Parent.Touched:connect(onTouched) |
I have roblox 2014, but the tutorial I watched was 2013, can you please tell me why It won't work?
Remove the first line. That first connection line isn't necessary (Unless if you're calling another function by the name of "Touched").
I believe its on line 2 that you forgot the .Parent it should be ( I may be wrong, but give it a shot )
1 | function onTouched(hit.Parent) |