Hello! So I have this brick. I want 4 people to be able to go through it, then it's CanCollide becomes false, so nobody else can get through. It doesn't appear to be doing anything... I went through it like 20 times.
01 | for i = 1 , 4 do |
02 | function onTouched(hit) |
03 | script.Parent.Transparency = . 5 |
04 | wait(. 3 ) |
05 | script.Parent.Transparency = 0 |
06 |
07 | end |
08 | end |
09 | script.Parent.CanColloid = false |
10 |
11 | if (script.Parent ~ = nil ) and (script.Parent.className = = "Part" ) then --Work if in a block |
12 | connection = script.Parent.Touched:connect(onTouched) |
13 | end |