local item = vci.assets.GetTransform("Ball") local effect = vci.assets.GetEffekseerEmitter("Ball") vci.StartCoroutine( coroutine.create( function() while true do if item.IsAttached == false then item.AttachToAvatar() sleep(0.1) if item.IsAttached then effect.Play() sleep(5) item.DetachFromAvatar() effect.Stop() sleep(1) end end sleep(0.5) end end ) ) function sleep(sec) local t0 = os.time() + sec while os.time() < t0 do coroutine.yield() end end