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

Help with a 'for' loop?

Asked by 9 years ago

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.

for i = 1, 4 do
    function onTouched(hit)
        script.Parent.Transparency = .5
        wait(.3)
        script.Parent.Transparency = 0

    end
end
script.Parent.CanColloid = false

if (script.Parent ~= nil) and (script.Parent.className == "Part") then --Work if in a block
    connection = script.Parent.Touched:connect(onTouched)
end
0
'CanColloid' on line 09. Redbullusa 1580 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

CanCollide is spelled incorrectly at line 09.

Ad

Answer this question