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

Why does this script only work once? [SOLVED]

Asked by 10 years ago

Here is the script I made: It works once, but when I touch the part again, it doesn't work?

Any help?

Brick=script.Parent

Brick.Touched:connect(function(part)
    if part.Parent.Humanoid then
        if part.Parent.Humanoid.Health > 0 then
    Brick.Transparency=.4
    wait(2)
    Brick.Transparency=1

end
end
end)




1 answer

Log in to vote
0
Answered by
jav2612 180
10 years ago
Brick=script.Parent

Brick.Touched:connect(function(part)
    if part.Parent:FindFirstChild("Humanoid") then
        if part.Parent.Humanoid.Health > 0 then
            Brick.Transparency=.4
            wait(2)
            Brick.Transparency=1

        end
    end
end)

Not sure if this is the exact problem but it's worth a try.

0
Worked! Thank you! DrCylonide 158 — 10y
Ad

Answer this question