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

Transparency is not changing every 3 seconds?

Asked by
FiredDusk 1466 Moderation Voter
8 years ago
part = script.Parent

function TouchedBrick()--Function name can be anything!
        while true do
        part.Transparency = .5
        wait(3)
        part.Transparency = 0
        wait(3)
        end

part.Touched:connect(TouchedBrick)--Touched is an event to a part.

1 answer

Log in to vote
1
Answered by 8 years ago

Your only error here is you forgot one end. end are important if you want to stop a function, Loop or another more things.

here's your code fix ;)

part = script.Parent

function TouchedBrick()--Function name can be anything!
        while true do
        part.Transparency = .5
        wait(3)
        part.Transparency = 0
        wait(3)
        end
end

part.Touched:connect(TouchedBrick)--Touched is an event to a part.


here we go now it should work.

Ad

Answer this question