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

Why does this script only work once? [SOLVED]

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

✓ Accepted answer
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.

1 comment

0

Worked! Thank you!

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