local s=2 local m=3 local function h()if isAnimating then return end isAnimating=true local h={}h.Transparency=1 local f=tweenService:Create(script.Parent,TweenInfo.new(m),h)f:Play()f.Completed:Wait()wait(s)h.Transparency=0 local S=tweenService:Create(script.Parent,TweenInfo.new(m),h)S:Play()S.Completed:Wait()isAnimating=false end script.Parent.Touched:Connect(h)

local REAPPEAR_TIME = 2 --//Once the part becomes invisible, after this amount of seconds it'll appear again
local FADE_TIME = 3 --//How long it takes for the part to become fully visible/invisible

local function Animate()
	if isAnimating then return end

	isAnimating = true

	local targetProperties = {}
	targetProperties.Transparency = 1

	local disappearFade = tweenService:Create(script.Parent, TweenInfo.new(FADE_TIME), targetProperties)

	disappearFade:Play()
	disappearFade.Completed:Wait()

	wait(REAPPEAR_TIME)

	targetProperties.Transparency = 0

	local appearFade = tweenService:Create(script.Parent, TweenInfo.new(FADE_TIME), targetProperties)

	appearFade:Play()
	appearFade.Completed:Wait()

	isAnimating = false
end

script.Parent.Touched:Connect(Animate)
