I made this script inside a part, that when touched, it becomes invisible, and when not touched, it appears again.
When I touch it, it turns invisible, but it stays like that even when I'm not touching it.
script.Parent.Touched:connect(function(HIT)
local H = HIT.Parent:FindFirstChild("Humanoid")
if H then
script.Parent.Transparency = 1
elseif not H then
script.Parent.Transparency = 0
end
end)

1 comment
Perfect! I didn't know such a function existed!