Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Transparency is not changing every 3 seconds?

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

✓ Accepted answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.